Radial Chart
Overview
Pull requests
Today vs. yesterday
Time axis
Categories
Angular rings
Patterned dots
API Reference
Types come from the public API. A dash indicates no default is documented here.
RadialChart props
Public source| Prop | Type | Default | Description |
|---|---|---|---|
key | KeepAliveKey<K, Ends> | undefined | '' | The child's identity among its parent's children of one component, or a kept child's among its author's. The empty string by default. |
onEmit | Show type((events: { readonly _tag: "HoverChanged"; readonly index: number | null; }) => NoInfer<Msg> | undefined) | { readonly HoverChanged: (event: { readonly _tag: "HoverChanged"; readonly index: number | null; }) => NoInfer<Msg> | undefined; } | undefined | — | Handle the child's events with a callback, or supply one handler per tag for tagged events. Return a parent message to dispatch it, or `undefined` to ignore the event. |
props.data | readonly { readonly [x: string]: string | number | null; }[] | Required | |
props.id | string | Required | |
props.ariaLabel | string | Required | |
props.series | Show typereadonly { readonly dataKey: string; readonly label?: string; readonly opacity?: number; readonly color?: string; readonly rampFrom?: number; readonly emphasize?: boolean; }[] | Required | |
props.layers | Show typereadonly ({ readonly kind: "axis"; readonly props: { readonly labelOrientation?: "horizontal" | "radial" | "tangential"; readonly valueTicks?: number | readonly number[]; readonly valueTickFormat?: "number" | "compact" | "percent" | "temperature"; readonly showCircle?: boolean; readonly showTicks?: boolean; readonly tickStep?: number; }; } | { readonly kind: "dot-bar"; readonly props: { readonly layout?: "columns" | "grid"; readonly rows?: number; readonly dotSize?: number; readonly fadedOpacity?: number; readonly patterns?: { readonly [x: string]: { readonly stroke?: string; readonly strokeWidth?: number; readonly preset?: "diagonal-up" | "diagonal-down" | "dots" | "cross"; }; }; readonly maxValue?: number; readonly annotations?: readonly { readonly label: string; readonly index: number; readonly color?: string; }[]; readonly ghostDataKey?: string; readonly ghostColor?: string; readonly ghostOpacity?: number; readonly ghostDotSize?: number; readonly rampExtent?: number; }; } | { readonly kind: "bar"; readonly props: { readonly gap?: number; readonly fadedOpacity?: number; readonly cornerRadius?: number; readonly maxValue?: number; }; } | { readonly kind: "ring-bar"; readonly props: { readonly fadedOpacity?: number; readonly cornerRadius?: number; readonly segmentGap?: number; }; } | { readonly kind: "line"; readonly props: { readonly dataKey: string; readonly stroke?: string; readonly strokeOpacity?: number; readonly strokeWidth?: number; readonly showMarkers?: boolean; readonly maxValue?: number; readonly dash?: boolean; readonly showNowMarker?: boolean; }; } | { readonly kind: "area"; readonly props: { readonly dataKey: string; readonly fill?: string; readonly stroke?: string; readonly fillOpacity?: number; readonly strokeWidth?: number; readonly curve?: "basis" | "linear" | "catmullRom"; readonly maxValue?: number; readonly ghostDataKey?: string; readonly lowerDataKey?: string; }; } | { readonly kind: "scrubber"; readonly props: { readonly color?: string; readonly variant?: "solid" | "gradient" | "dashed"; }; })[] | Required | |
props.legend | { readonly suffix?: string; readonly showValues?: boolean; } | — | |
props.animate | boolean | true | |
props.center | Show type{ readonly value?: number; readonly prefix?: string; readonly detail?: string; readonly unit?: "number" | "compact" | "percent" | "temperature"; readonly dataKey?: string; readonly labelDataKey?: string; readonly suffix?: string; readonly defaultLabel?: string; readonly comparisonDataKey?: string; readonly comparisonLabel?: string; readonly hoverLabelPrefix?: string; readonly hoverLabelSuffix?: string; readonly detailValueKey?: string; readonly detailTotalKey?: string; readonly detailSuffix?: string; } | — | |
props.maxWidth | number | 640 | |
props.layout | Show type{ readonly center?: number; readonly axisLabel?: number; readonly tickInner?: number; readonly tickMinorOuter?: number; readonly tickMajorOuter?: number; readonly bandInner?: number; readonly bandOuter?: number; readonly scrubberOuter?: number; } | — | |
props.orientation | "radial" | "angular" | — | |
props.ringGap | number | 0.3 | |
props.xDataKey | string | 'time' | |
props.hoveredIndex | number | null | — | |
props.startAngle | number | 0 | |
props.endAngle | number | — | |
props.maxValue | number | "stacked" | "auto" | — | |
props.angleType | "time" | "band" | "clock" | 'clock' | |
props.nowIndex | number | props.data.findLastIndex((_, index) => !future[index]) | |
props.minValue | number | "auto" | 0 | |
props.valueKeys | readonly string[] | [] | |
props.fitArc | boolean | — | |
props.trackNow | boolean | (props.angleType ?? 'clock') === 'clock' | |
props.niceValues | boolean | — |