Line Chart
Preview
Monthly revenue
Demo data, in thousands of dollars
| Category | This year | Last year | Target |
|---|---|---|---|
| Jan | $36.4K | $36.5K | $36.0K |
| Feb | $43.0K | $35.8K | $38.5K |
| Mar | $43.9K | $36.3K | $41.0K |
| Apr | $44.2K | $39.9K | $43.5K |
| May | $49.1K | $43.3K | $46.0K |
| Jun | $52.2K | $40.9K | $48.5K |
| Jul | $53.6K | $44.2K | $51.0K |
| Aug | $58.7K | $45.6K | $53.5K |
| Sep | $63.8K | $51.1K | $56.0K |
| Oct | $67.1K | $55.5K | $58.5K |
| Nov | $71.6K | $53.7K | $61.0K |
| Dec | $75.6K | $55.5K | $63.5K |
Install
Add it with your package manager, or copy the source manually.
Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide
Download the release archive to your project root, then install the local file.
Import the shared styles once in your application.
API Reference
LineChart
seriesreadonly LineChartSeries[]—categoriesreadonly string[]Unique x-axis labels in display order. Values align with them by index.
—variant?"line" | "area"`area` fills each line down to zero with a fading gradient.
—curve?LineChartCurve—domain?readonly [number, number]Fixed value-axis bounds. Defaults to rounded bounds around the visible series.
—v-model:activeId?string | nullInspected category, by label.
—defaultActiveId?string | null—@active-change?(id: string | null) => void—v-model:hiddenSeries?readonly string[]Series ids hidden through the legend.
—defaultHiddenSeries?readonly string[]—formatValue?(value: number) => string—formatTick?(value: number) => stringAxis tick labels. Defaults to compact notation (1.2K).
—label?string—status?"ready" | "loading"`loading` hides the lines behind a pulsing placeholder until your data arrives; switching to `ready` hands off to the draw-in. Keep one chart mounted across both states.
—loadingLabel?stringShown over the placeholder while loading. An empty string hides it.
—labels?Partial<LineChartMessages>Override any built-in string, including the shared `xyChart` ones.
—class?string—@hidden-series-change?(ids: readonly string[]) => void—LineChartLegend
class?string—LineChartPlot
height?numberPlot height in px, excluding the category labels.
288strokeWidth?numberStroke width of each line, in px.
2showGrid?booleantruefadeEdges?booleanFade lines and fills out toward the left and right edges of the plot.
trueclass?string—LineChartTooltip
class?string—side?"auto" | "left" | "right"`auto` sits right of the point, flips left near the right edge, and on plots too narrow for either moves above or below the point instead.
autoUpdated