DataChartUI

components/data/ChartUI.vue

Full Chart.js wrapper supporting line and bar charts with auto-formatted axes.

Scenarios
Empty

Single point

Overflow (1000 points)

components/data/ChartUI.vue

Usage

<DataChartUI :data = "[]" type = "line" :compact = "false" unit = "—" :showYAxis = "true" :showXAxis = "true" />

Props

PropTypeDefaultDescription
dataArray[]Array of timestamped data points
typeString'line''line' or 'bar'
compactBooleanfalseReduce axis label size
unitString''Y-axis unit ('bytes', 'duration', or custom)
showYAxisBooleantrueDisplay Y-axis
showXAxisBooleantrueDisplay X-axis

Related