@@ -26,21 +26,23 @@ export const useRadialBar = ({
26
26
startAngle = commonDefaultProps . startAngle ,
27
27
endAngle = commonDefaultProps . endAngle ,
28
28
padding = commonDefaultProps . padding ,
29
+ padAngle = commonDefaultProps . padAngle ,
30
+ cornerRadius = commonDefaultProps . cornerRadius ,
29
31
width,
30
32
height,
31
33
colors = commonDefaultProps . colors ,
32
- cornerRadius = commonDefaultProps . cornerRadius ,
33
34
tracksColor = commonDefaultProps . tracksColor ,
34
35
} : {
35
36
data : RadialBarDataProps [ 'data' ]
36
37
valueFormat ?: RadialBarCommonProps [ 'valueFormat' ]
37
38
startAngle : RadialBarCommonProps [ 'startAngle' ]
38
39
padding : RadialBarCommonProps [ 'padding' ]
40
+ padAngle : RadialBarCommonProps [ 'padAngle' ]
41
+ cornerRadius : RadialBarCommonProps [ 'cornerRadius' ]
39
42
endAngle : RadialBarCommonProps [ 'endAngle' ]
40
43
width : number
41
44
height : number
42
45
colors : RadialBarCommonProps [ 'colors' ]
43
- cornerRadius : RadialBarCommonProps [ 'cornerRadius' ]
44
46
tracksColor : RadialBarCommonProps [ 'tracksColor' ]
45
47
} ) => {
46
48
// using a hook, not because it's costly to compute, but because this is used as
@@ -112,8 +114,9 @@ export const useRadialBar = ({
112
114
. endAngle ( d => d . endAngle )
113
115
. innerRadius ( d => d . innerRadius )
114
116
. outerRadius ( d => d . outerRadius )
115
- . cornerRadius ( cornerRadius ) ,
116
- [ cornerRadius ]
117
+ . cornerRadius ( cornerRadius )
118
+ . padAngle ( degreesToRadians ( padAngle ) ) ,
119
+ [ cornerRadius , padAngle ]
117
120
)
118
121
119
122
const formatValue = useValueFormatter < number > ( valueFormat )
0 commit comments