ui.echart
EChart element
See https://echarts.apache.org/examples/en/index.html for examples
on how to use ECharts
Example usage:
from uiwiz import ui
options = {
"title": {"text": "ECharts entry example"},
"tooltip": {},
"legend": {"data": ["Sales"]},
"xAxis": {"data": ["shirt", "cardign", "chiffon shirt", "pants", "heels", "socks"]},
"yAxis": {},
"series": [{"name": "Sales", "type": "bar", "data": [5, 20, 36, 10, 10, 20]}],
}
ui.echart(options)
Constructor
options: dictNo default required argument
height: str= h-80
Methods
after_render(html: str) -> str
This method is called after the element is rendered.
:param html: The rendered HTML of the element.
before_render() -> Any
This method is called before the element is rendered.
classes(input: str) -> Self
Set tailwind classes for the element.
:param input: The tailwind classes to apply to the element.
:return: The current instance of the element.
container_classes(input: str) -> EChart
No documentation providedget_classes() -> str
Get html classes of the element.
:return: The classes of the element.
:type: str
render(render_script: bool) -> str
Render the element as HTML.
:param render_script: If any element has a javascript script, it will be rendered as well.
:type render_script: bool
response(data: dict, headers: dict) -> JSONResponse
No documentation providedsize(size: Literal) -> Self
Set the size of the element.
:param size: The size of the element.
:return: The current instance of the element.