TidalUI

Bar chart preview

Compare grouped or stacked values with exact readings, negative values and a 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/bar-chart

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

Preview

Bar chart component preview

Open interactive preview

Minimal example

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

API and props

TidalBarChart.data (required)
ReadonlyArray<TidalBarDatum>

Required data value accepted by this exported component.

TidalBarChart.series (required)
ReadonlyArray<TidalBarSeries>

Required series value accepted by this exported component.

TidalBarChart.title (required)
ReactNode

Required title value accepted by this exported component.

TidalBarChart.description
ReactNode

Optional description value accepted by this exported component.

TidalBarChart.emptyMessage
ReactNode

Optional empty message value accepted by this exported component.

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

Optional format value value accepted by this exported component.

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

Optional heading level value accepted by this exported component.

TidalBarChart.mode
"grouped" | "stacked" | undefined

Optional mode value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas