Donut chart preview
Show composition with exact controlled inspection, legend visibility and a native table fallback.
pro · Data · composite
When to use
- Use it when a page needs show composition with exact controlled inspection, legend visibility and a native table fallback.
- Choose it when the data structure, labels, and state are supplied by the application and must remain consumer controlled.
Alternatives
- Choose analytics-card instead when explore revenue, compare periods and inspect chart values is the actual interface need, rather than donut chart.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/donut-chartImport components/ui/tidal.css, components/ui/donut-chart.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/donut-chart.css";
import{TidalDonutChart}from"./components/ui/donut-chart";
export default()=><div className="tidal-scope"><TidalDonutChart segments={[{id:"example",label:"Demo",value:1,displayValue:"value"}]} title={"Demo"} totalText={"Demo"}/></div>;API and props
TidalDonutChart.segments (required)ReadonlyArray<TidalDonutSegment>Required segments value accepted by this exported component.
TidalDonutChart.title (required)ReactNodeRequired title value accepted by this exported component.
TidalDonutChart.totalText (required)ReactNodeRequired total text value accepted by this exported component.
TidalDonutChart.activeIdstring | undefinedOptional active id value accepted by this exported component.
TidalDonutChart.centerReactNodeOptional center value accepted by this exported component.
TidalDonutChart.chartLabelstring | undefinedOptional chart label value accepted by this exported component.
TidalDonutChart.descriptionReactNodeOptional description value accepted by this exported component.
TidalDonutChart.emptyMessageReactNodeOptional empty message value accepted by this exported component.
TidalDonutChart.getLegendButtonProps((segment: TidalDonutSegment) => LegendButtonProps | undefined) | undefinedOptional get legend button props value accepted by this exported component.
TidalDonutChart.headingLevel"h2" | "h3" | "h4" | undefinedOptional heading level value accepted by this exported component.
TidalDonutChart.hiddenIdsReadonlyArray<string> | undefinedOptional hidden ids value accepted by this exported component.
TidalDonutChart.legendButtonRefsReadonly<Record<string, Ref<HTMLButtonElement> | undefined>> | undefinedOptional legend button refs value accepted by this exported component.
TidalDonutChart.legendLabelstring | undefinedOptional legend label value accepted by this exported component.
TidalDonutChart.onActiveChange((segment: TidalDonutSegment, source: "keyboard" | "pointer") => void) | undefinedCallback invoked when the active change interaction is proposed.
TidalDonutChart.onHiddenChange((hiddenIds: readonly string[], segment: TidalDonutSegment) => void) | undefinedCallback invoked when the hidden change interaction is proposed.
TidalDonutChart.segmentRefsReadonly<Record<string, Ref<SVGGElement> | undefined>> | undefinedOptional segment refs value accepted by this exported component.
TidalDonutChart.tableLabelReactNodeOptional table label value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- The host application owns data, validation, persistence, navigation, and service side effects described by this API.