uibrik

Tide Chart

New

Preview

Customize

Stream
number
Bands4
Height260px
Accent

Usage

import { TideChart } from "@/components/uibrik/tide-chart/tide-chart";

<TideChart />

Installation

npx shadcn@latest add https://uibrik.com/r/tide-chart.json
Adds the files to components/uibrik/tide-chart and installs @number-flow/react, @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/tide-chart.

Props

TideChart
title
Type string
"Traffic by source"
Names what is plotted.
layout
Type "stream" | "stack"
"stream"
Bands centred on a flowing axis, or stacked on the floor.
format
Type Intl.NumberFormatOptions
{}
Formats every number.
height
Type number
260
Plot height.
accent
Type string
""
First band colour. Empty uses the chart palette.
data
Type ({ label: string } & Record<string, number>)[]
–
One row per period, oldest first, with a value per series key.
series
Type { key: string; label: string; color?: string }[]
–
The bands to draw, 2 to 6, bottom to top.
onActiveChange
Type (index: number | null) => void
–
Called with the row under the cursor.
className
Type string
–
Classes for the outer shell.