Avoid data sorting in Donut chart
See original GitHub issueI am submitting a…
- Feature request
- Design defect
- Source code defect
- Demo/documentation defect
- Other
charts version:
"@carbon/charts": "^0.41.30",
"@carbon/charts-react": "^0.41.30",
"carbon-components": "^10.22.0",
"carbon-components-react": "^7.22.0",
Issue description
Donut chart is sorting my data, I want to avoid that
Steps to produce the issue
Create a Donut chart where options have a specific order. Click here to see an example.
Current behavior
It sorts the data by decreasing order.
Expected behavior
It should render the data in the order I give them to it. Or at least provide an option to behave like that.
Screenshot or recording
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:9 (4 by maintainers)
Top Results From Across the Web
prevent d3 donut chart from sorting automatically
Is there a way to prevent a donut chart from sorting values automatically? I don't see anywhere where I have specified that values...
Read more >Avoid grouping in Pie or Donut chart
Solved: Hi, I have a requirement as "I have 10 rooms as Room A, Room B, Room C etc., based on the time...
Read more >A Complete Guide to Pie Charts | Tutorial by Chartio
Avoid distorting effects Reading a pie chart accurately requires that the slices' areas, arc lengths, and angles all point to an accurate representation...
Read more >Excel Charts: Sorted Bar Chart as Alternative to the Pie Chart
The reputation of pie charts has majorly dropped in the past years. For good reason too.How can you make better graphs than the...
Read more >Dos and don'ts of data visualisation — European Environment ...
Bar chart: do use the full axis and avoid distortion ... Pie charts: cons (and pros) ... Do sort your data for easier...
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 FreeTop 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
Top GitHub Comments
I’ll make sure that design responds to this soon
I made a PR https://github.com/carbon-design-system/carbon-charts/pull/1043 to add sortFunction option for the pie chart (also work on Donut chart)
this can fix the issue by replacing the sort function
Examples
sort by reversed value
sort by name
sort by group order