TidalUI

Area chart preview

Compare nonnegative time series as stacked or overlaid areas with exact period inspection.

pro · Data · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/area-chart

Import components/ui/tidal.css, components/ui/area-chart.css. Wrap installed components in tidal-scope.

Preview

Area chart component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/area-chart.css";
import{TidalAreaChart}from"./components/ui/area-chart";
export default()=><div className="tidal-scope"><TidalAreaChart data={[{id:"example",label:"Demo",values:{}}]} onSelectedChange={() => {}} selectedId={"example"} series={[{id:"example",label:"Demo"}]} title={"Demo"}/></div>;

API and props

TidalAreaChart.data (required)
ReadonlyArray<TidalAreaDatum>

Required data value accepted by this exported component.

TidalAreaChart.onSelectedChange (required)
(id: string, event: ChangeEvent<HTMLInputElement> | PointerEvent<HTMLDivElement>) => void

Callback invoked when the selected change interaction is proposed.

TidalAreaChart.selectedId (required)
string

Required selected id value accepted by this exported component.

TidalAreaChart.series (required)
ReadonlyArray<TidalAreaSeries>

Required series value accepted by this exported component.

TidalAreaChart.title (required)
ReactNode

Required title value accepted by this exported component.

TidalAreaChart.description
ReactNode

Optional description value accepted by this exported component.

TidalAreaChart.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalAreaChart.formatAxisValue
((value: number) => string) | undefined

Optional format axis value value accepted by this exported component.

TidalAreaChart.formatValue
((value: number) => string) | undefined

Optional format value value accepted by this exported component.

TidalAreaChart.headingLevel
"h2" | "h3" | "h4" | "h5" | "h6" | undefined

Optional heading level value accepted by this exported component.

TidalAreaChart.labels
Partial<{ inspect: string; series: string; total: string; missing: string; table: string; period: string; invalid: string; empty: string; plot: string; }> | undefined

Optional labels value accepted by this exported component.

TidalAreaChart.mode
"stacked" | "overlaid" | undefined

Optional mode value accepted by this exported component.

TidalAreaChart.plotProps
Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "aria-hidden" | "children" | "dangerouslySetInnerHTML"> | undefined

Optional plot props value accepted by this exported component.

TidalAreaChart.rangeProps
NativeRange | undefined

Optional range props value accepted by this exported component.

TidalAreaChart.rangeRef
Ref<HTMLInputElement> | undefined

Optional range ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas