You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's pretty common to want to add or change the stuff that goes into the pie slices. Right now you have to calculate the position yourself, and animations don't come out right.
We use g elements for the slices themselves, but this doesn't really help for adding images at the center where labels would go, as asked in this SO question:
Btw, the answer provides a great example of why it's nice that we exposed all the private methods on upgrading to ES6 in v4. It uses both PieChart._buildArcs() and PieChart._labelPosition() and it would be a lot messier without them.
gordonwoodhull
changed the title
pie label text should use g element
pie label label should use g element
May 3, 2021
It's pretty common to want to add or change the stuff that goes into the pie slices. Right now you have to calculate the position yourself, and animations don't come out right.
We use
g
elements for the slices themselves, but this doesn't really help for adding images at the center where labels would go, as asked in this SO question:https://stackoverflow.com/questions/67340109/how-to-add-icons-in-dc-js-piechart-slices-instead-texts
This has come up before. There are other charts where we put the label in a
g
and it is helpful.The text was updated successfully, but these errors were encountered: