TidalUI

Scatter plot preview

Compare independent numeric measures with exact point inspection, directional keyboard movement, and a complete data table.

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/scatter-plot

Import components/ui/tidal.css, components/ui/scatter-plot.css. Wrap installed components in tidal-scope.

Preview

Scatter plot component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/scatter-plot.css";
import{TidalScatterPlot}from"./components/ui/scatter-plot";
export default()=><div className="tidal-scope"><TidalScatterPlot data={[{id:"example",label:"Demo",x:1,y:1}]} onSelectedChange={() => {}} selectedId={"example"} title={"Demo"} xLabel={"Demo"} yLabel={"Demo"}/></div>;

API and props

TidalScatterPlot.data (required)
ReadonlyArray<TidalScatterPoint>

Required data value accepted by this exported component.

TidalScatterPlot.onSelectedChange (required)
(id: string, event: MouseEvent<HTMLButtonElement> | KeyboardEvent<HTMLButtonElement>) => void

Callback invoked when the selected change interaction is proposed.

TidalScatterPlot.selectedId (required)
string | null

Required selected id value accepted by this exported component.

TidalScatterPlot.title (required)
ReactNode

Required title value accepted by this exported component.

TidalScatterPlot.xLabel (required)
string

Required x label value accepted by this exported component.

TidalScatterPlot.yLabel (required)
string

Required y label value accepted by this exported component.

TidalScatterPlot.description
ReactNode

Optional description value accepted by this exported component.

TidalScatterPlot.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalScatterPlot.formatX
((value: number) => string) | undefined

Optional format x value accepted by this exported component.

TidalScatterPlot.formatY
((value: number) => string) | undefined

Optional format y value accepted by this exported component.

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

Optional heading level value accepted by this exported component.

TidalScatterPlot.labels
Partial<{ plot: string; instructions: string; empty: string; invalid: string; selection: string; none: string; table: string; point: string; inspect: string; }> | undefined

Optional labels value accepted by this exported component.

TidalScatterPlot.plotProps
PlotNative | undefined

Optional plot props value accepted by this exported component.

TidalScatterPlot.plotRef
Ref<HTMLButtonElement> | undefined

Optional plot ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas