feat: parent child retrieval (#12106)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
@@ -10,10 +10,11 @@ export type SimplePieChartProps = {
|
||||
fill?: string
|
||||
stroke?: string
|
||||
size?: number
|
||||
animationDuration?: number
|
||||
className?: string
|
||||
}
|
||||
|
||||
const SimplePieChart = ({ percentage = 80, fill = '#fdb022', stroke = '#f79009', size = 12, className }: SimplePieChartProps) => {
|
||||
const SimplePieChart = ({ percentage = 80, fill = '#fdb022', stroke = '#f79009', size = 12, animationDuration, className }: SimplePieChartProps) => {
|
||||
const option: EChartsOption = useMemo(() => ({
|
||||
series: [
|
||||
{
|
||||
@@ -34,7 +35,7 @@ const SimplePieChart = ({ percentage = 80, fill = '#fdb022', stroke = '#f79009',
|
||||
{
|
||||
type: 'pie',
|
||||
radius: '83%',
|
||||
animationDuration: 600,
|
||||
animationDuration: animationDuration ?? 600,
|
||||
data: [
|
||||
{ value: percentage, itemStyle: { color: fill } },
|
||||
{ value: 100 - percentage, itemStyle: { color: '#fff' } },
|
||||
@@ -48,7 +49,7 @@ const SimplePieChart = ({ percentage = 80, fill = '#fdb022', stroke = '#f79009',
|
||||
cursor: 'default',
|
||||
},
|
||||
],
|
||||
}), [stroke, fill, percentage])
|
||||
}), [stroke, fill, percentage, animationDuration])
|
||||
|
||||
return (
|
||||
<ReactECharts
|
||||
|
Reference in New Issue
Block a user