RadialBar
父组件
RadialBar consumes context provided by these components:
activeShape(union of 5 variants)optional
angleAxisIdnumber | stringoptional
默认值:
0animationBeginnumberoptional
Specifies when the animation should begin, the unit of this option is ms.
默认值:
0animationDurationnumberoptional
Specifies the duration of animation, the unit of this option is ms.
默认值:
1500animationEasing"ease" | "ease-in" | "ease-in-out" | "ease-out" | "linear" | "spring" | EasingFunction | `cubic-bezier(${number},${number},${number},${number})`optional
The type of easing function.
默认值:
"ease"animationInterpolateFnAnimationInterpolateFn<RadialBarDataItem, PolarLayout>optional
Custom animation function for interpolating data items. When provided, this replaces the default animation interpolation.
Recharts 自 3.9
animationMatchBy"append" | "index" | AnimationMatchBy<RadialBarDataItem>optional
Strategy for matching previous items to next items during animation. Determines how Recharts pairs old data points with new data points to create smooth transitions.
matchAppend(default): match sequentially by index and treat newly appended items as newmatchByIndex: match by array position with proportional stretchingmatchByDataKey('someKey'): match by a data key from the payload- Custom function
(item, index) => key: match by the returned key
默认值:
"append"background(union of 7 variants)optional
Renders a background for each bar. Options:
false: no background;true: renders default background;object: the props of background rectangle;ReactElement: a custom background element;function: a render function of custom background.
默认值:
falsebarSizenumberoptional
The width or height of each bar. If the barSize is not specified, the size of the bar will be calculated by the barCategoryGap, barGap and the quantity of bar groups.
childrenReactNodeoptional
classNamestringoptional
cornerIsExternalbooleanoptional
默认值:
falsecornerRadiusnumber | stringoptional
默认值:
0dangerouslySetInnerHTMLObjectoptional
dataKeyTypedDataKey<DataPointType, DataValueType>optional
The data that you provide via the
dataprop is an array of objects. Each object can have multiple properties, each representing a different data dimension. Use thedataKeyprop to specify which property (or dimension) to use for this component.Typically, you will want to have one dataKey on the X axis, and different dataKey on the Y axis, where they extract different values from the same data objects.
Decides how to extract the value from the data:
string: the name of the field in the data object;number: the index of the field in the data;function: a function that receives the data object and returns the value.
forceCornerRadiusbooleanoptional
默认值:
falseformatterFormatteroptional
Formats the value displayed in the tooltip for this RadialBar. When set, takes precedence over the
formatterprop on the Tooltip component.hidebooleanoptional
默认值:
falseisAnimationActive"auto" | false | trueoptional
If set false, animation of radial bars will be disabled. If set "auto", the animation will be disabled in SSR and will respect the user's prefers-reduced-motion system preference for accessibility.
默认值:
"auto"labelFunction | Props | ReactNode | false | trueoptional
Renders one label for each data point. Options:
true: renders default labels;false: no labels are rendered;object: the props of LabelList component;ReactElement: a custom SVG label element, such as<text>or<g>. HTML elements such as<div>are not valid inside the chart SVG and may trigger React DOM warnings.function: a render function of custom label.
默认值:
falselegendType"circle" | "cross" | "diamond" | "line" | "none" | "plainline" | "rect" | "square" | "star" | "triangle" | "wye"optional
The type of icon in legend. If set to 'none', no legend item will be rendered.
默认值:
"rect"maxBarSizenumberoptional
minPointSizenumberoptional
默认值:
0radiusAxisIdnumber | stringoptional
默认值:
0shape(union of 5 variants)optional
If set a ReactElement, the shape of radial bar sectors can be customized. If set a function, the function will be called to render customized shape. During animations, the function shape also receives
animationElapsedTime,isAnimating, andisEntrance. By default, renders a sector.stackIdnumber | stringoptional
tooltipType"none"optional
zIndexnumberoptional
默认值:
300