Component libraryArea chart
Area chart
ProCompare nonnegative time series as stacked or overlaid areas with exact period inspection.
npx shadcn@latest add @tidal-pro/area-chartInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/area-chart.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Consumer-owned data and series require unique nonblank IDs and labels. One to six series and up to 1,000 ordered periods are supported. Values are finite nonnegative numbers or explicit null for missing values; missing keys, negative/nonfinite values, duplicate IDs, unknown selection and unrepresentable totals produce a configuration alert. Stacked mode gaps the whole period when any series is missing; overlaid mode gaps only the missing series. Single points and all-zero values remain visible and exact. Controlled selectedId/onSelectedChange supports mouse/pen plot inspection and a native range field for keyboard or touch selection; touch scrolling over the plot is preserved. Optional formatValue/formatAxisValue, title/description/h2-h6 heading, localized labels, disabled state, safe root attrs/ref, native range attrs/ref and plot pointer attrs are supported. The native range serializes a period index if a name is supplied. Native range onChange and plot pointer handlers run first and may prevent a proposal. A native data-table disclosure exposes every supplied value. No interpolation, estimation, analytics request, persistence or data fetching is bundled.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.