Is it possible to choose the items order in Donut chart?
See original GitHub issueHi everyone,
I would like to show several items in the donut chart in a specific order.
Example:
const data = [ { quantity: 20, name: 'critical', id: 1 }, { quantity: 30, name: 'normal', id: 2 }, { quantity: 50, name: 'good', id: 3 } ]
In this case, the “good” slice will be the first displayed in the donut in the clockwise rotation, then the “normal” slice and finally the “critical” slice, because briteCharts generates from the biggest slice to the smallest, right?
Is it possible to define my own order, like using the ids ? If it’s the case, I didn’t find how to do that in the documentation.
Sorry for my poor English and thank you for your help !
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Present your data in a doughnut chart - Microsoft Support
Rotate the slices in a doughnut chart In a doughnut chart, click the data series or a data point, or do the following...
Read more >Solved: Pie Chart Order of Slices (NOT accordingly to lett...
It is important that you use "Sort by column" from the upper menu after you have selected the Category column. From the options...
Read more >A Complete Guide to Pie Charts | Tutorial by Chartio
Pie charts are a common but often misused visualization to show division of a whole into parts. Learn how to get the most...
Read more >Create a Doughnut Chart - YouTube
A doughnut chart is similar to pie chart in that it's round, but that where most of the similarities stop. Doughnut charts have...
Read more >Numbers Donut Charts (#1633) - YouTube
https://macmost.com/e-1633 A new feature of Numbers, Pages and Keynote is the ability to use Donut charts instead of Pie charts to represent ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/eventbrite/britecharts/pull/409
So, I checked with @evb-sun and we think we will prefer to keep the default order as it is and add the option to change it.
The resultant API would be something like: donut.orderingFunction(fn);
where the fn would be something like: (a, b) => b.quantity + a.quantity
or similar.