Bar
Compare magnitudes across categories with vertical or horizontal bars.
Change and progress over ordered samples as a line or area chart.
Chart
Change over time. Follow a trajectory, not unrelated magnitudes. Not a Chart cousin.
One series over time, as an area with the grid. Variants shows line, multiple series and more.
Daily average, last 7 days
Use LineChart for change over time. Hover a moment to read the sample. Area fills the path; line keeps the stroke only.
import { LineChart } from "agentic-ds-kit";From contracts/linechart.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| data | array | No | — | — |
| labels | array | No | — | — |
| series | array | No | — | { label, data: number[], color?, dashed? }[]. dashed draws the series as a dashed line with no area fill and a dashed legend swatch, for a comparison such as the previous period; it still counts toward the value axis. |
| referenceLine | object | No | — | One dashed horizontal guide (text.muted) at value, with its label at the line's right end. The value axis widens to include it. highlight marks points of solid series above (or below) it with an accent dot (fill.brand); not with stack (the edges are running totals). The table gets a caption with the label and value, and each point's name says when it is past the line. Ignored with stack percent. |
| highlightLast | boolean | No | false | A dot and a value chip on the latest point of the first solid series, like today's MRR. Ignored with stack. |
| changeStrip | object | No | — | A short bar strip under the plot on the same labels, like net change per day. Bars go up from zero for gains and down for losses, square, in the first solid series' colour, on their own scale with two axis labels. It shares the crosshair and tooltip, adds a legend item and a table column, and joins each point's accessible name. format defaults to a signed compact number with a real minus sign (+1,200, −1,600). |
| title | string | No | — | Chart heading. A title, legend, actions or the Table toggle draw the chart's own frame; directly in a Card body the frame is dropped and the Card is the frame. |
| description | string | No | — | — |
| variant | line | area | No | area | — |
| stack | none | stacked | percent | No | none | Only with variant area. stacked piles the series as bands from the bottom up, so the top edge is the total; percent scales each column to 100% so the bands show each series' share. Missing or negative values count as 0. Ignored with variant line, with a warning in development |
| curve | smooth | linear | No | smooth | smooth rounds the line through every point (monotone: no overshoot above peaks or below dips); linear draws straight segments |
| showGrid | boolean | No | true | — |
| showTable | boolean | No | true | — |
| includeZero | boolean | No | false | — |
| height | number | No | 240 | — |
| emptyLabel | string | No | No data for this range | — |
| isLoading | boolean | No | false | — |
| error | string | No | — | When set, the plot is replaced by the kit's "Couldn't load" row (role=alert) with this message. Say what failed and that data is safe, like "Stripe didn't answer in time." |
| onRetry | function | No | — | Shows an outline Retry Button on the error row. |
| tickInterval | number | No | — | draw every Nth axis label; with neither tickInterval nor formatLabel, labels thin automatically only when they would overlap |
| formatLabel | function | No | — | (label, index) => string for the painted axis label; return '' to hide one (turns off automatic thinning). Table and accessible names keep the raw label |
| tooltipNote | function | No | — | (index) => string | undefined. One sentence under the tooltip rows for that sample, like "The largest drop in 30 days." Read with the tooltip; keep it short and plain. |
| animate | boolean | No | false | Lines draw in left to right and area fills fade in after when the chart first appears. Runs when the chart mounts; changing data on a mounted chart does not replay it. To replay (e.g. one chart per Tabs panel, or a range switcher), give the chart a key that changes with the data. Off under prefers-reduced-motion |
| actions | slot | No | — | Kit Buttons in the chart header, before the Table toggle, like an icon-only Ask. ghost sm reads quietest. Setting it draws the frame even with no title. |
Compare magnitudes across categories with vertical or horizontal bars.
Part-to-whole share for a handful of segments, as a donut or solid pie.
Assistant panel with a header, a thread, and a composer.
One metric anomaly an agent flagged, so a person understands it before anything is fixed.