Brush chart
A line chart showing a movable window into a long series paired with a full-history overview strip.
import { BrushChart } from '@uthereal/ui/brush-chart'Brush chart playground
| Date | Active users |
|---|---|
| Jan 1, 2026 | 2,400 |
| Jan 2, 2026 | 2,760 |
| Jan 3, 2026 | 2,865 |
| Jan 4, 2026 | 2,656 |
| Jan 5, 2026 | 2,315 |
| Jan 6, 2026 | 2,128 |
| Jan 7, 2026 | 2,260 |
| Jan 8, 2026 | 2,630 |
| Jan 9, 2026 | 2,973 |
| Jan 10, 2026 | 3,045 |
| Jan 11, 2026 | 2,808 |
| Jan 12, 2026 | 2,465 |
| Jan 13, 2026 | 2,297 |
| Jan 14, 2026 | 2,450 |
| Jan 15, 2026 | 2,822 |
| Jan 16, 2026 | 3,141 |
| Jan 17, 2026 | 3,175 |
| Jan 18, 2026 | 2,909 |
| Jan 19, 2026 | 2,561 |
| Jan 20, 2026 | 2,409 |
| Jan 21, 2026 | 2,580 |
| Jan 22, 2026 | 2,949 |
| Jan 23, 2026 | 3,240 |
| Jan 24, 2026 | 3,233 |
| Jan 25, 2026 | 2,938 |
| Jan 26, 2026 | 2,587 |
| Jan 27, 2026 | 2,452 |
| Jan 28, 2026 | 2,638 |
| Jan 29, 2026 | 3,002 |
| Jan 30, 2026 | 3,262 |
| Jan 31, 2026 | 3,216 |
| Feb 1, 2026 | 2,896 |
| Feb 2, 2026 | 2,545 |
| Feb 3, 2026 | 2,430 |
| Feb 4, 2026 | 2,633 |
| Feb 5, 2026 | 2,992 |
| Feb 6, 2026 | 3,225 |
| Feb 7, 2026 | 3,143 |
| Feb 8, 2026 | 2,803 |
| Feb 9, 2026 | 2,459 |
| Feb 10, 2026 | 2,368 |
| Feb 11, 2026 | 2,592 |
| Feb 12, 2026 | 2,950 |
| Feb 13, 2026 | 3,157 |
| Feb 14, 2026 | 3,046 |
| Feb 15, 2026 | 2,695 |
| Feb 16, 2026 | 2,365 |
| Feb 17, 2026 | 2,305 |
| Feb 18, 2026 | 2,554 |
| Feb 19, 2026 | 2,913 |
| Feb 20, 2026 | 3,100 |
| Feb 21, 2026 | 2,965 |
| Feb 22, 2026 | 2,609 |
| Feb 23, 2026 | 2,302 |
| Feb 24, 2026 | 2,278 |
| Feb 25, 2026 | 2,554 |
| Feb 26, 2026 | 2,917 |
| Feb 27, 2026 | 3,087 |
| Feb 28, 2026 | 2,934 |
| Mar 1, 2026 | 2,579 |
| Mar 2, 2026 | 2,300 |
| Mar 3, 2026 | 2,316 |
| Mar 4, 2026 | 2,621 |
| Mar 5, 2026 | 2,988 |
| Mar 6, 2026 | 3,141 |
| Mar 7, 2026 | 2,973 |
| Mar 8, 2026 | 2,623 |
| Mar 9, 2026 | 2,374 |
| Mar 10, 2026 | 2,430 |
| Mar 11, 2026 | 2,762 |
| Mar 12, 2026 | 3,129 |
| Mar 13, 2026 | 3,264 |
| Mar 14, 2026 | 3,080 |
| Mar 15, 2026 | 2,736 |
| Mar 16, 2026 | 2,517 |
| Mar 17, 2026 | 2,610 |
| Mar 18, 2026 | 2,964 |
| Mar 19, 2026 | 3,326 |
| Mar 20, 2026 | 3,439 |
| Mar 21, 2026 | 3,236 |
| Mar 22, 2026 | 2,896 |
| Mar 23, 2026 | 2,703 |
| Mar 24, 2026 | 2,828 |
| Mar 25, 2026 | 3,197 |
| Mar 26, 2026 | 3,547 |
| Mar 27, 2026 | 3,631 |
| Mar 28, 2026 | 3,406 |
| Mar 29, 2026 | 3,067 |
| Mar 30, 2026 | 2,896 |
| Mar 31, 2026 | 3,047 |
| Apr 1, 2026 | 3,423 |
| Apr 2, 2026 | 3,753 |
| Apr 3, 2026 | 3,803 |
| Apr 4, 2026 | 3,551 |
| Apr 5, 2026 | 3,209 |
| Apr 6, 2026 | 3,057 |
| Apr 7, 2026 | 3,228 |
| Apr 8, 2026 | 3,604 |
| Apr 9, 2026 | 3,908 |
| Apr 10, 2026 | 3,919 |
| Apr 11, 2026 | 3,639 |
| Apr 12, 2026 | 3,294 |
| Apr 13, 2026 | 3,159 |
| Apr 14, 2026 | 3,345 |
| Apr 15, 2026 | 3,716 |
| Apr 16, 2026 | 3,991 |
| Apr 17, 2026 | 3,962 |
| Apr 18, 2026 | 3,654 |
| Apr 19, 2026 | 3,307 |
| Apr 20, 2026 | 3,189 |
| Apr 21, 2026 | 3,391 |
| Apr 22, 2026 | 3,755 |
| Apr 23, 2026 | 3,999 |
| Apr 24, 2026 | 3,931 |
| Apr 25, 2026 | 3,600 |
| Apr 26, 2026 | 3,255 |
| Apr 27, 2026 | 3,158 |
| Apr 28, 2026 | 3,377 |
| Apr 29, 2026 | 3,737 |
| Apr 30, 2026 | 3,952 |
| May 1, 2026 | 3,850 |
| May 2, 2026 | 3,501 |
| May 3, 2026 | 3,166 |
| May 4, 2026 | 3,095 |
| May 5, 2026 | 3,335 |
| May 6, 2026 | 3,691 |
| May 7, 2026 | 3,882 |
| May 8, 2026 | 3,752 |
| May 9, 2026 | 3,393 |
| May 10, 2026 | 3,076 |
| May 11, 2026 | 3,037 |
| May 12, 2026 | 3,301 |
| May 13, 2026 | 3,659 |
| May 14, 2026 | 3,829 |
| May 15, 2026 | 3,677 |
| May 16, 2026 | 3,316 |
| May 17, 2026 | 3,023 |
| May 18, 2026 | 3,022 |
| May 19, 2026 | 3,313 |
| May 20, 2026 | 3,673 |
| May 21, 2026 | 3,826 |
| May 22, 2026 | 3,657 |
| May 23, 2026 | 3,300 |
| May 24, 2026 | 3,036 |
| May 25, 2026 | 3,075 |
| May 26, 2026 | 3,394 |
| May 27, 2026 | 3,757 |
| May 28, 2026 | 3,893 |
| May 29, 2026 | 3,708 |
| May 30, 2026 | 3,358 |
| May 31, 2026 | 3,126 |
| Jun 1, 2026 | 3,204 |
| Jun 2, 2026 | 3,548 |
| Jun 3, 2026 | 3,910 |
| Jun 4, 2026 | 4,026 |
| Jun 5, 2026 | 3,826 |
| Jun 6, 2026 | 3,483 |
| Jun 7, 2026 | 3,280 |
| Jun 8, 2026 | 3,395 |
| Jun 9, 2026 | 3,759 |
| Jun 10, 2026 | 4,113 |
| Jun 11, 2026 | 4,206 |
| Jun 12, 2026 | 3,987 |
| Jun 13, 2026 | 3,649 |
| Jun 14, 2026 | 3,473 |
| Jun 15, 2026 | 3,617 |
| Jun 16, 2026 | 3,994 |
| Jun 17, 2026 | 4,333 |
| Jun 18, 2026 | 4,396 |
| Jun 19, 2026 | 4,155 |
| Jun 20, 2026 | 3,817 |
| Jun 21, 2026 | 3,664 |
| Jun 22, 2026 | 3,833 |
| Jun 23, 2026 | 4,213 |
| Jun 24, 2026 | 4,531 |
| Jun 25, 2026 | 4,558 |
| Jun 26, 2026 | 4,291 |
| Jun 27, 2026 | 3,952 |
| Jun 28, 2026 | 3,817 |
| Jun 29, 2026 | 4,004 |
Overview
A brush chart pairs a detail line chart with an overview strip of the complete series below it. Readers resize the active window by dragging either edge grip, pan by dragging the window body, draw a new window across the strip, tap to recenter, or double-click to reset to the full history. The detail plot rescales its axes to the visible window and supports crosshair exploration, tooltips, legend toggles, and keyboard navigation.
Use a brush chart when readers need both full-history context and close inspection of shorter intervals. For short series that fit cleanly in one view, use a line chart.
Usage
import { BrushChart } from '@uthereal/ui/brush-chart'
export function ActiveUsers({ days }: { days: { x: string; y: number }[] }) {
return (
<BrushChart
title="Daily active users"
series={[{ id: 'dau', label: 'Active users', points: days }]}
onRangeChange={(range) => console.log(range)}
/>
)
}The active window is a zero-based [first, last] tuple indexing distinct x positions across all series. Omitting defaultRange opens on the entire series, and minWindow (default 7) sets the minimum number of points allowed in the window. Pass range and onRangeChange to control the window externally.
Examples
Event annotations
Pass annotations to mark events on both the main plot and the overview strip. Each annotation draws a vertical rule and marker dot with a collision-avoiding label. Hovering a marker displays its description, and tooltips and keyboard announcements include any event at the active point.
| Date | Active users |
|---|---|
| Jan 1, 2026 | 2,400 |
| Jan 2, 2026 | 2,760 |
| Jan 3, 2026 | 2,865 |
| Jan 4, 2026 | 2,656 |
| Jan 5, 2026 | 2,315 |
| Jan 6, 2026 | 2,128 |
| Jan 7, 2026 | 2,260 |
| Jan 8, 2026 | 2,630 |
| Jan 9, 2026 | 2,973 |
| Jan 10, 2026 | 3,045 |
| Jan 11, 2026 | 2,808 |
| Jan 12, 2026 | 2,465 |
| Jan 13, 2026 | 2,297 |
| Jan 14, 2026 | 2,450 |
| Jan 15, 2026 | 2,822 |
| Jan 16, 2026 | 3,141 |
| Jan 17, 2026 | 3,175 |
| Jan 18, 2026 | 2,909 |
| Jan 19, 2026 | 2,561 |
| Jan 20, 2026 | 2,409 |
| Jan 21, 2026 | 2,580 |
| Jan 22, 2026 | 2,949 |
| Jan 23, 2026 | 3,240 |
| Jan 24, 2026 | 3,233 |
| Jan 25, 2026 | 2,938 |
| Jan 26, 2026 | 2,587 |
| Jan 27, 2026 | 2,452 |
| Jan 28, 2026 | 2,638 |
| Jan 29, 2026 | 3,002 |
| Jan 30, 2026 | 3,262 |
| Jan 31, 2026 | 3,216 |
| Feb 1, 2026 | 2,896 |
| Feb 2, 2026 | 2,545 |
| Feb 3, 2026 | 2,430 |
| Feb 4, 2026 | 2,633 |
| Feb 5, 2026 | 2,992 |
| Feb 6, 2026 | 3,225 |
| Feb 7, 2026 | 3,143 |
| Feb 8, 2026 | 2,803 |
| Feb 9, 2026 | 2,459 |
| Feb 10, 2026 | 2,368 |
| Feb 11, 2026 | 2,592 |
| Feb 12, 2026 | 2,950 |
| Feb 13, 2026 | 3,157 |
| Feb 14, 2026 | 3,046 |
| Feb 15, 2026 | 2,695 |
| Feb 16, 2026 | 2,365 |
| Feb 17, 2026 | 2,305 |
| Feb 18, 2026 | 2,554 |
| Feb 19, 2026 | 2,913 |
| Feb 20, 2026 | 3,100 |
| Feb 21, 2026 | 2,965 |
| Feb 22, 2026 | 2,609 |
| Feb 23, 2026 | 2,302 |
| Feb 24, 2026 | 2,278 |
| Feb 25, 2026 | 2,554 |
| Feb 26, 2026 | 2,917 |
| Feb 27, 2026 | 3,087 |
| Feb 28, 2026 | 2,934 |
| Mar 1, 2026 | 2,579 |
| Mar 2, 2026 | 2,300 |
| Mar 3, 2026 | 2,316 |
| Mar 4, 2026 | 2,621 |
| Mar 5, 2026 | 2,988 |
| Mar 6, 2026 | 3,141 |
| Mar 7, 2026 | 2,973 |
| Mar 8, 2026 | 2,623 |
| Mar 9, 2026 | 2,374 |
| Mar 10, 2026 | 2,430 |
| Mar 11, 2026 | 2,762 |
| Mar 12, 2026 | 3,129 |
| Mar 13, 2026 | 3,264 |
| Mar 14, 2026 | 3,080 |
| Mar 15, 2026 | 2,736 |
| Mar 16, 2026 | 2,517 |
| Mar 17, 2026 | 2,610 |
| Mar 18, 2026 | 2,964 |
| Mar 19, 2026 | 3,326 |
| Mar 20, 2026 | 3,439 |
| Mar 21, 2026 | 3,236 |
| Mar 22, 2026 | 2,896 |
| Mar 23, 2026 | 2,703 |
| Mar 24, 2026 | 2,828 |
| Mar 25, 2026 | 3,197 |
| Mar 26, 2026 | 3,547 |
| Mar 27, 2026 | 3,631 |
| Mar 28, 2026 | 3,406 |
| Mar 29, 2026 | 3,067 |
| Mar 30, 2026 | 2,896 |
| Mar 31, 2026 | 3,047 |
| Apr 1, 2026 | 3,423 |
| Apr 2, 2026 | 3,753 |
| Apr 3, 2026 | 3,803 |
| Apr 4, 2026 | 3,551 |
| Apr 5, 2026 | 3,209 |
| Apr 6, 2026 | 3,057 |
| Apr 7, 2026 | 3,228 |
| Apr 8, 2026 | 3,604 |
| Apr 9, 2026 | 3,908 |
| Apr 10, 2026 | 3,919 |
| Apr 11, 2026 | 3,639 |
| Apr 12, 2026 | 3,294 |
| Apr 13, 2026 | 3,159 |
| Apr 14, 2026 | 3,345 |
| Apr 15, 2026 | 3,716 |
| Apr 16, 2026 | 3,991 |
| Apr 17, 2026 | 3,962 |
| Apr 18, 2026 | 3,654 |
| Apr 19, 2026 | 3,307 |
| Apr 20, 2026 | 3,189 |
| Apr 21, 2026 | 3,391 |
| Apr 22, 2026 | 3,755 |
| Apr 23, 2026 | 3,999 |
| Apr 24, 2026 | 3,931 |
| Apr 25, 2026 | 3,600 |
| Apr 26, 2026 | 3,255 |
| Apr 27, 2026 | 3,158 |
| Apr 28, 2026 | 3,377 |
| Apr 29, 2026 | 3,737 |
| Apr 30, 2026 | 3,952 |
| May 1, 2026 | 3,850 |
| May 2, 2026 | 3,501 |
| May 3, 2026 | 3,166 |
| May 4, 2026 | 3,095 |
| May 5, 2026 | 3,335 |
| May 6, 2026 | 3,691 |
| May 7, 2026 | 3,882 |
| May 8, 2026 | 3,752 |
| May 9, 2026 | 3,393 |
| May 10, 2026 | 3,076 |
| May 11, 2026 | 3,037 |
| May 12, 2026 | 3,301 |
| May 13, 2026 | 3,659 |
| May 14, 2026 | 3,829 |
| May 15, 2026 | 3,677 |
| May 16, 2026 | 3,316 |
| May 17, 2026 | 3,023 |
| May 18, 2026 | 3,022 |
| May 19, 2026 | 3,313 |
| May 20, 2026 | 3,673 |
| May 21, 2026 | 3,826 |
| May 22, 2026 | 3,657 |
| May 23, 2026 | 3,300 |
| May 24, 2026 | 3,036 |
| May 25, 2026 | 3,075 |
| May 26, 2026 | 3,394 |
| May 27, 2026 | 3,757 |
| May 28, 2026 | 3,893 |
| May 29, 2026 | 3,708 |
| May 30, 2026 | 3,358 |
| May 31, 2026 | 3,126 |
| Jun 1, 2026 | 3,204 |
| Jun 2, 2026 | 3,548 |
| Jun 3, 2026 | 3,910 |
| Jun 4, 2026 | 4,026 |
| Jun 5, 2026 | 3,826 |
| Jun 6, 2026 | 3,483 |
| Jun 7, 2026 | 3,280 |
| Jun 8, 2026 | 3,395 |
| Jun 9, 2026 | 3,759 |
| Jun 10, 2026 | 4,113 |
| Jun 11, 2026 | 4,206 |
| Jun 12, 2026 | 3,987 |
| Jun 13, 2026 | 3,649 |
| Jun 14, 2026 | 3,473 |
| Jun 15, 2026 | 3,617 |
| Jun 16, 2026 | 3,994 |
| Jun 17, 2026 | 4,333 |
| Jun 18, 2026 | 4,396 |
| Jun 19, 2026 | 4,155 |
| Jun 20, 2026 | 3,817 |
| Jun 21, 2026 | 3,664 |
| Jun 22, 2026 | 3,833 |
| Jun 23, 2026 | 4,213 |
| Jun 24, 2026 | 4,531 |
| Jun 25, 2026 | 4,558 |
| Jun 26, 2026 | 4,291 |
| Jun 27, 2026 | 3,952 |
| Jun 28, 2026 | 3,817 |
| Jun 29, 2026 | 4,004 |
Behavior
The detail plot rescales its value axis to the active window (starting at zero unless zero: false), draws 1.75 px lines with an area wash under the first series, and clips continuations at the window edges. With fewer than two points, the plot renders emptyLabel ("No data yet") and hides the overview strip.
When zoomed out so points sit closer than roughly 4 px apart, a centered seven-point moving average and its low-to-high band crossfade over the raw series so short-term noise reads as texture. The tooltip then includes averageLabel and changeLabel comparing seven points earlier. Legend toggles, loading state, and the full-series data table match Line chart.
API reference
These serializable arguments and defaults come directly from the component schema.
| Argument | Type / default | Description |
|---|---|---|
title | stringDefault: "Brush chart" | Figure title. It names the chart for assistive technology and captions the data table. |
description | string— | One or two sentences on what the chart shows, below the title; omit it when the title says enough. |
tableToggle | booleanDefault: false | Show a button that reveals the data table. The table is always available to assistive technology. |
tableLabel | stringDefault: "Data table" | Name of the data table button. |
pointLabel | stringDefault: "{series}, {x}: {value}" | Announced when keyboard focus moves to a point. {series}, {x} and {value} are filled in. |
noDataLabel | stringDefault: "No data" | Shown in the tooltip and announced for a missing value (null). |
valueFormat | NumberFormat— | How values appear in the tooltip, table and axis: decimal, percent or currency, with fraction digits. Axis ticks are compacted (12.9K). |
locale | string— | BCP 47 locale for numbers and dates. Omit it to inherit the application locale (en-US by default). |
series | ChartSeries[]Default: [{"id":"visits","label":"Visits","points":[{"x":"2026-01-01","y":3200},{"x":"2026-02-01","y":3500},{"x":"2026-03-01","y":3350},{"x":"2026-04-01","y":4100},{"x":"2026-05-01","y":4300},{"x":"2026-06-01","y":4720}]}] | One to eight series, each with an id, a label and { x, y } points. x is a number or an ISO date (the same kind in every series, not repeated within one); a null y leaves a gap. Colors follow the series order and never move when a series is hidden; a series may set its own color and a dashed stroke. A series may set its own color (hex, rgb, hsl, oklch or var(--token)) over its slot and dashed: true for a dashed stroke (Arc: 4 5 at 1.75px), e.g. a previous period or a target. |
xLabel | stringDefault: "Date" | Header of the x column in the data table. |
curve | linear | monotoneDefault: "monotone" | linear joins points with straight segments; monotone draws a smooth curve that never overshoots the data. |
area | booleanDefault: true | A 10% wash under the first shown series. |
zero | booleanDefault: true | Start the value axis at zero (unless the data dips below it); off fits the axis to the data. |
directLabels | booleanDefault: false | Unused by the brush chart (Arc draws no line-end labels); kept for the shared line fields. |
emptyLabel | stringDefault: "No data yet" | Shown over the plot when the series have fewer than two points (the overview is hidden then). |
loading | booleanDefault: false | Keep the current lines on screen, dimmed and breathing, while the host loads the next data; the plot is marked busy. |
loadingLabel | stringDefault: "Loading" | Announced politely while loading. |
legendToggle | booleanDefault: true | With two or more series, legend entries hide and show their series. |
legendLabel | stringDefault: "Legend" | Accessible name of the legend list. |
annotations | BrushAnnotation[]Default: [] | Events marked on both charts, at most 50, each with an id, an x (the same kind as the series x), a short label and an optional description. The main chart draws a rule and a dot with its label where it fits (labels that would collide are skipped); hovering the dot shows the description; the tooltip and the announcement name an event at the point read. The overview marks each event with a small dot. |
averageLabel | stringDefault: "{value} seven day average" | Tooltip note while points are crowded and the seven point moving average with its band replaces the raw line (Arc). {value} is filled in. |
changeLabel | stringDefault: "{change} vs a week earlier" | Tooltip note comparing the point read with seven points earlier, e.g. "+4.1% vs a week earlier". {change} is filled in. |
defaultRange | [number, number]— | Initial window as [first, last] point positions, counted from 0 across every distinct x. Omit it to show the whole series. Later argument edits do not reset an existing instance. |
minWindow | integerDefault: 7 | Fewest points the window may show (default 7); the handles, zoom keys and drawn windows stop there. |
overviewLabel | stringDefault: "Overview" | Accessible name of the overview strip. |
windowLabel | stringDefault: "Window" | Accessible name of the window slider, which pans with the arrow keys, zooms with + and −, and resets with Escape or 0. |
plotLabel | stringDefault: "{title}, {window}. Use left and right arrows to read values." | Accessible name of the main plot, as Arc names it: {title} and {window} (windowValueLabel) are filled in, with a hint about the arrow keys. |
windowValueLabel | stringDefault: "{start} to {end}" | Announced value of the window slider. {start} and {end} are filled with the first and last x shown. |
windowStartLabel | stringDefault: "Window start" | Accessible name of the start handle. |
windowEndLabel | stringDefault: "Window end" | Accessible name of the end handle. |
height | integerDefault: 268 | Main chart height in pixels, axes included (120–640). The default 268 is Arc’s 240px plot plus its 28px date axis. |
overviewHeight | integerDefault: 52 | Overview strip height in pixels (32–120; Arc: 52). |
recipe | studio | softDefault: "studio" | Visual treatment. Both recipes use the same interaction behavior. |
theme | BrushChartTheme— | Color mode, accent, and tokens, including the chart palette (series1–series8). See Theming. |
motion | none | subtle | expressiveDefault: "subtle" | Draw-in and window change animation preset. System reduced-motion preferences take precedence. |
motionOptions | ChartMotionOptions— | draw (lines wiping in once the chart scrolls into view) and morph (lines and the window gliding when the window is set from outside, stepped or reset): a tween with a duration (ms) or a spring. |
dir | ltr | rtl— | Reading direction of the text. The chart, the overview and the handles always run left to right. Omit it to inherit the page direction. |
React integration
| Prop | Purpose |
|---|---|
range | Controlled window as [first, last] distinct x positions |
onRangeChange | Fires with the updated [first, last] window while it moves, in both modes |
preset | Application defaults, overridden by explicit instance props |
tokens | CSS variables applied after the typed theme |
ref | Ref forwarded to the root <figure> |
className, style | Applied to the root <figure> |
| Native attributes | id, data-*, and remaining <figure> attributes forwarded to the root |
Keyboard & accessibility
| Focus target | Key | Interaction |
|---|---|---|
| Detail plot | ArrowLeft, ArrowRight | Step backward or forward along x inside the window |
| Detail plot | ArrowUp, ArrowDown | Switch active series |
| Detail plot | Home, End, Escape | Jump to window ends, or clear the active reading |
| Overview window | ArrowLeft, ArrowRight | Pan the window by one tenth of its width |
| Overview window | Shift+Arrow, PageUp/Down | Pan the window by half its width |
| Overview window | +, - | Zoom in or out (down to minWindow points) |
| Overview window | Home, End, 0, Escape | Jump to series ends, or reset to the full series |
| Edge grips | ArrowLeft, ArrowRight | Move the grip by one point (Shift or PageUp/Down: 10) |
| Edge grips | Home, End, 0, Escape | Move grip to series end, or reset to the full series |
The chart renders a <figure> named by title, described by description, and linked via aria-details to a full-series data table. The overview strip is a group named by overviewLabel containing a slider for the window (windowLabel, value text windowValueLabel) and two range-slider edge grips (windowStartLabel, windowEndLabel) with 28 × 44 px hit targets. Plot, overview, and grips always run left to right in both LTR and RTL layouts.
Motion and theming
Lines wipe in once when the chart scrolls into view; server-rendered markup is final. Programmatic window changes, keyboard steps, zoom, and resets animate on the shared chart morph transition while the main lines, moving average, and band resample across the plot. Pointer drags track directly without lag, and edge grips scale slightly on hover and press. motionOptions.draw and motionOptions.morph accept a tween with duration (ms) or a spring. motion="none" and prefers-reduced-motion: reduce make updates immediate.
theme accepts a mode, an accent, and semantic tokens including the chart palette (used for series lines and the window ring) and shadowResting for the grips. An application-wide UtherealProvider supplies defaults.
Composition
In an agent composition, BrushChart is a leaf with no actions. Its active window is host state stored at /components/instance-<id>/range, initialized from defaultRange or the full series. See Building with agents.
{
"type": "BrushChart",
"props": {
"title": "Daily active users",
"series": [
{
"id": "dau",
"label": "Active users",
"points": [
{ "x": "2026-01-01", "y": 2400 },
{ "x": "2026-01-02", "y": 2510 },
{ "x": "2026-01-03", "y": 2460 }
]
}
]
},
"children": []
}