Charts

Charts

Thin, themed wrappers around Chart.js via vue-chartjs: DXBarChart, DXLineChart, and DXDoughnutChart. They apply the Bootstrap palette (read from the live theme) and dashboard-friendly defaults (no x-axis gridlines, formatted value ticks and tooltips, responsive, legend hidden for a single series). Pass labels + datasets; options deep-merges over the defaults so you can override anything Chart.js supports.

Optional peer dependencies

Charts require chart.js and vue-chartjs, which are optional peer dependencies — install them only if you use the chart components:

npm install chart.js vue-chartjs

Live Examples

Props

DXBarChart and DXLineChart:

Name Click to sort ascendingType Required Click to sort ascendingDefault Description
labelsstring[]Yes-X-axis category labels
datasetsChartDataset[]Yes-Chart.js datasets; colours are themed when a dataset omits them
optionsobjectNo-Chart.js options, deep-merged over the themed defaults
valueFormat'number' | 'currency' | 'percent'No-Format value-axis ticks and tooltips
currencySymbolstringNo'£'Currency symbol for valueFormat: "currency"
localestringNo-Locale for number formatting
showLegendbooleanNomulti-seriesShow the legend (defaults to true when there is more than one dataset)

DXDoughnutChart is the same, minus the value axis, plus a data convenience prop (number[], one value per label) as an alternative to datasets, and showLegend defaults to true.