TidalUI

Line chart preview

A controlled responsive line chart with exact pointer and native-button inspection plus an HTML data table fallback.

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/line-chart

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

Preview

Line chart component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/line-chart.css";
import{TidalLineChart}from"./components/ui/line-chart";
export default()=><div className="tidal-scope"><TidalLineChart points={[{id:"example",label:"Demo",value:1,displayValue:"value"}]} title={"Demo"}/></div>;

API and props

TidalLineChart.points (required)
ReadonlyArray<TidalLineChartPoint>

Required points value accepted by this exported component.

TidalLineChart.title (required)
ReactNode

Required title value accepted by this exported component.

TidalLineChart.chartLabel
string | undefined

Optional chart label value accepted by this exported component.

TidalLineChart.description
ReactNode

Optional description value accepted by this exported component.

TidalLineChart.emptyMessage
ReactNode

Optional empty message value accepted by this exported component.

TidalLineChart.eyebrow
ReactNode

Optional eyebrow value accepted by this exported component.

TidalLineChart.footer
ReactNode

Optional footer value accepted by this exported component.

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

Optional format axis value value accepted by this exported component.

TidalLineChart.headingLevel
"h2" | "h3" | "h4" | undefined

Optional heading level value accepted by this exported component.

TidalLineChart.motionKey
string | number | undefined

Optional motion key value accepted by this exported component.

TidalLineChart.nextButtonProps
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> | undefined

Optional next button props value accepted by this exported component.

TidalLineChart.nextButtonRef
Ref<HTMLButtonElement> | undefined

Optional next button ref value accepted by this exported component.

TidalLineChart.nextLabel
string | undefined

Optional next label value accepted by this exported component.

TidalLineChart.onSelectedChange
((point: TidalLineChartPoint, source: "pointer" | "previous" | "next") => void) | undefined

Callback invoked when the selected change interaction is proposed.

TidalLineChart.previousButtonProps
Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> | undefined

Optional previous button props value accepted by this exported component.

TidalLineChart.previousButtonRef
Ref<HTMLButtonElement> | undefined

Optional previous button ref value accepted by this exported component.

TidalLineChart.previousLabel
string | undefined

Optional previous label value accepted by this exported component.

TidalLineChart.selectedId
string | undefined

Optional selected id value accepted by this exported component.

TidalLineChart.tableLabel
ReactNode

Optional table label value accepted by this exported component.

TidalLineChart.xAxisLabel
string | undefined

Optional x axis label value accepted by this exported component.

TidalLineChart.yAxisLabel
string | undefined

Optional y axis label value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas