Prop
colors
string[]
Change the default colors.
index
string
Required*Sets the key to map the data to the axis.
data
Record<string, any>[]
Required*The source data, in which each entry is a dictionary.
margin
Spacing
Margin of each the container
filterOpacity
number
Change the opacity of the non-selected field
showTooltip
boolean
Controls the visibility of tooltip.
showLegend
boolean
Controls the visibility of legend.
category
string
Required*Sets the name of the key containing the quantitative chart values.
type
'donut' | 'pie'
Change the type of the chart
sortFunction
((a: any, b: any) => number)
Function to sort the segment
valueFormatter
((tick: number, i?: number, ticks?: number[]) => string)
Controls the formatting for the label.
customTooltip
Component
Render custom tooltip component.