Components
BaseChartCard
A card with a title, a description and a chart picked by preset.
components/ui/chart/BaseChartCard.vue
View in the demo
Presets
area
Desktop, mobile and tablet over the last week.
line
Desktop, mobile and tablet over the last week.
bar
Desktop, mobile and tablet over the last week.
stacked-bar
Desktop, mobile and tablet over the last week.
donut
Desktop, mobile and tablet over the last week.
pie
Desktop, mobile and tablet over the last week.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
titlerequired | string | — | The card title, also the chart’s accessible name. |
description | string | — | A sentence under the title. |
preset | ChartPreset | — | bar, stacked-bar, area, line, donut or pie. |
series | ChartSeriesInput | [] | The data. |
categories | (string | number)[] | [] | The labels. |
horizontal | boolean | false | Horizontal bars. |
markers | boolean | false | Point markers. |
legend | boolean | — | Forces the legend. |
value-format | ChartValueFormatter | — | Formats axes and tooltips. |
options | ChartOptions | {} | ECharts options merged on top. |
loading | boolean | false | Shows the skeleton. |
height | string | number | — | The chart height. With fill it is the minimum height. |
fill | boolean | false | The chart grows to fill the card when the card is taller than the chart, for example when it sits next to a longer card in the same row. On phones it keeps height. |
Slots
Name | Slot props | Description |
|---|---|---|
#chart | — | Replaces the chart with your own content. |