a-chart
A chart rendered with chart.js.
ChartElement
A simple chart with data loaded from a URL and styleable with CSS. Data should be structured acording to the Chart.js Data Structure.
Example
<a-chart
type="bar"
class="h-[300px] aspect-[2/1] text-black stroke-black/5 dark:stroke-white/5 dark:text-white"
src="/atrium/chart-data.json"
/> Attributes
| Name | Type | Default value | Description |
|---|---|---|---|
height
|
number | undefined |
height in pixel |
src
|
string | undefined |
url to daata |
type
|
"bar" | "line" | undefined |
chart type |
width
|
number | undefined |
width in pixel |
Events
| Name | Description |
|---|---|
load
|
Emitted when the chart has loaded. |