@@ -7,6 +7,7 @@ import React, { CSSProperties, FC, forwardRef, Ref, useCallback, useMemo } from
77import { Cell , Label , Legend , Pie , PieChart as PieChartLib , Tooltip } from 'recharts' ;
88import { getValueByDataKey } from 'recharts/lib/util/ChartUtils' ;
99import { IChartMeasure } from '../../interfaces/IChartMeasure' ;
10+ import { IPolarChartConfig } from "../../interfaces/IPolarChartConfig" ;
1011import { RechartBaseProps } from '../../interfaces/RechartBaseProps' ;
1112import { defaultFormatter } from '../../internal/defaults' ;
1213import { tooltipContentStyle , tooltipFillOpacity } from '../../internal/staticProps' ;
@@ -35,7 +36,7 @@ interface DimensionConfig {
3536 formatter ?: ( value : any ) => string ;
3637}
3738
38- export interface PieChartProps extends RechartBaseProps {
39+ export interface PieChartProps extends RechartBaseProps < IPolarChartConfig > {
3940 centerLabel ?: string ;
4041 dimension : DimensionConfig ;
4142 /**
@@ -79,6 +80,7 @@ const PieChart: FC<PieChartProps> = forwardRef((props: PieChartProps, ref: Ref<a
7980 legendPosition : 'bottom' ,
8081 legendHorizontalAlign : 'center' ,
8182 paddingAngle : 0 ,
83+ outerRadius : '80%' ,
8284 ...props . chartConfig
8385 } ;
8486 } , [ props . chartConfig ] ) ;
@@ -144,6 +146,7 @@ const PieChart: FC<PieChartProps> = forwardRef((props: PieChartProps, ref: Ref<a
144146 < PieChartLib onClick = { onDataPointClickInternal } margin = { chartConfig . margin } >
145147 < Pie
146148 innerRadius = { chartConfig . innerRadius }
149+ outerRadius = { chartConfig . outerRadius }
147150 paddingAngle = { chartConfig . paddingAngle }
148151 nameKey = { dimension . accessor }
149152 dataKey = { measure . accessor }
0 commit comments