pie chart default sort set to null #3467
-
First of all I really like the d3 project! I have used it the past month to create some stunning charts. But today I was trying to add a custom tween to my pie chart update transition. I had to debug for 3 hours just to find out that I had to add a ".sort(null)" to my pie generator function. Why isn't it by default null? When I was updating and repositioning pie slices they jumped from one position to another. Is there a good reason to make d3 by default sort the slices? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The default is to sort them by value, which is arguably often useful. Documented in https://github.com/d3/d3-shape#pie_sortValues |
Beta Was this translation helpful? Give feedback.
The default is to sort them by value, which is arguably often useful. Documented in https://github.com/d3/d3-shape#pie_sortValues