Closed Benbinbin closed 2 years ago
It just means that if f is a function and you call pie.startAngle(f)(data, "hello", "it's me"), f will be called with the arguments (data, "hello", "it's me").
In this case, if you have
pie = d3.pie()
.padAngle((_, { padAngle, padAngleDegrees = 0 } = {}) =>
padAngle === undefined ? (padAngleDegrees * Math.PI) / 180 : padAngle
)
you might call
pie(data, {padAngleDegrees: 1})
and it will compute the padAngle in radians from the value given in degrees.
according to document
and it should be call the pie generator like this
pie(data[, arguments…])
refer to the way to call the arc generator
I try the similar way to call the pie generator but it doesn't work
it seems like the way to treat the arguments in arc generator and pie generator is different.
which is the correct way to pass the arguments in pie generator?