Usage
Props
Data
DataKey<any>
required
The key of data values displayed on the radial bar chart.Can be a string, number, function, or array path.
string | number
The name of the radial bar data, used for tooltips and legends.
Axes
string | number
default:"0"
The id of the angle axis which this radial bar uses.
string | number
default:"0"
The id of the radius axis which this radial bar uses.
Dimensions
number
The width or height of each bar.If not specified, the size is calculated automatically based on barCategoryGap, barGap, and the number of bar groups.
number
The maximum size of each bar.
number
default:"0"
The minimum size in pixels for a bar to be rendered.Useful for ensuring small values are still visible.
Appearance
string
The fill color of the radial bars.
string
The stroke color of the radial bars.
number
The stroke width of the radial bars.
number | string
default:"0"
The radius of the rounded corners of each bar.
boolean
default:"false"
If true, the rounded corner is on the outer edge of the bar.
boolean
default:"false"
If true, forces the corner radius even when the bar is too small.
Background
boolean | object
default:"false"
Renders a background for each bar.Options:
false: no backgroundtrue: renders default backgroundobject: props for background rectangle
Labels
boolean | object | ReactElement | function
default:"false"
Renders one label for each data point.Options:
true: renders default labelsfalse: no labels are renderedobject: props for LabelList componentReactElement: custom label elementfunction: render function for custom label
Behavior
boolean
default:"false"
If true, the radial bar will not be rendered.Hidden elements are still visible in the legend.
string | number
The id of the group which this radial bar should be stacked with.Radial bars with the same stackId will be stacked together.
Custom shapes
ActiveShape
Custom shape for rendering radial bar sectors.Can be a React element, object, or function that receives sector props.
ActiveShape
Custom shape rendered when a sector is activated (by mouse hover, keyboard, etc.).
Animation
boolean | 'auto'
default:"auto"
If false, animation will be disabled.If “auto”, animation is disabled in SSR and respects the user’s prefers-reduced-motion preference.
number
default:"0"
Specifies when the animation should begin, in milliseconds.
number
default:"1500"
Specifies the duration of animation, in milliseconds.
string
default:"ease"
The type of easing function.Options: ‘ease’, ‘ease-in’, ‘ease-out’, ‘ease-in-out’, ‘linear’
function
Callback fired when animation starts.
function
Callback fired when animation ends.
Display
LegendType
default:"rect"
The type of icon in the legend.Options: ‘line’, ‘plainline’, ‘square’, ‘rect’, ‘circle’, ‘cross’, ‘diamond’, ‘star’, ‘triangle’, ‘wye’, ‘none’
TooltipType
Valid tooltip types for this graphical item.
number
default:"300"
The z-index of the radial bars.Higher values render on top of lower values.
Interaction
function
Event handler for click events on radial bar sectors.Signature:
(data: RadialBarDataItem, index: number, e: React.MouseEvent) => voidfunction
Event handler for mouse enter events on sectors.
function
Event handler for mouse leave events on sectors.
Other
string
CSS class name for the radial bar element.