Components Data
Chartlive
Bars, a line or an area, drawn as SVG by Python from your data. A live component.
A live component: its state is kept on the server, and each click or keystroke is answered by its Python class. Put @pbscripts in your layout.
$ pyblade ui:add chart
Bars
Switch between kinds
Props
Written as attributes of <pb-ui.chart>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.
| Name | Type | Default | Description |
|---|---|---|---|
| data | list | [] | A list of {"label", "value"} |
| kind | str | "bar" | bar, line or area |
| height | int | 220 | In pixels |
| switchable | bool | False | Shows buttons that change its kind |
| label | str | "Chart" | What screen readers call it |