How to reorder variable categories in legend and how to remove the total section in a pie chart?
I feel like I've tried everything... could really use some advice!
How to reorder variable categories in legend? The sorting function is not really working and I would want to avoid renaming the variable categories (this issue is also prevent in other cards).
Also, does anyone know how to remove the total section in a pie chart?
Thank you in advance!
Best Answer
-
@svetlana what Grant is saying is that you need to have two beast modes, one to be used for display purposes on your chart and one to be used in the sorting properties. They will have the same case statement syntax in them, just the sorting properties beast mode will result in a numerical value rather than a string. This way, the sorting can function properly. Here's an example from one of my cards:
Category for Display (used in the pie name field):
(CASE when `totalreported` < 250000 then '0-250k' when `totalreported` < 1000000 then '250k-1m' when `totalreported` < 2000000 then '1-2m' else '2m+' end)
Category for Sorting (used in the sorting properties):
(CASE when `totalreported` < 250000 then 1 when `totalreported` < 1000000 then 2 when `totalreported` < 2000000 then 3 else 4 end)
Also, it appears that pie charts behave slightly differently than other cards in this area. You also need to go to the General Properties and select No Auto Sort or else adding this beast mode to the sorting properties will have no impact.
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.2
Answers
-
To fix the sorting create a new beast mode and then have it return as specific numerical value (1-4) and then use that to sort your pie chart. That will reorder the legend in the order you define.
To remove the Total under your chart properties - Hover Legend - Title Value set that equal to None
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith thank you so much!
Do you think that there is no other way to go about the category order? I would much rather keep the names as is.
0 -
@GrantSmith and @MarkSnodgrass Thank you so much!!!
0
Categories
- 11K All Categories
- 5 Private Company Board
- 2 APAC User Group
- 12 Welcome
- 42 Domo News
- 9.9K Using Domo
- 2K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 349 Workbench
- 267 Domo Best Practices
- 12 Domo Certification
- 474 Domo Developer
- 51 Domo Everywhere
- 110 Apps
- 726 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 29 お知らせ
- 65 Kowaza
- 302 仲間に相談
- 664 ひらめき共有