-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom order of items in legend #625
Comments
I have changed the title to not limit the improvement to only Maps. It might be valuable to change the order of items in the legend for any visualisation option. In the image Mark shares above ideally the order of things would be from the highest risk to the lowest (or another way around). In this case, the lowest range should go first and the highest last to make it easier to read the legend and associated colours. |
Based on the assumption that there are a ltd number of categories on which to apply a custom order, we could |
Uses orderedLegend feature-flag insert into environment(id, "value") VALUES('orderedLegend', 'true'::jsonb); || update environment set "value"='true'::jsonb where id='orderedLegend'
@tangrammer I checked all our visualisations where we have a legend and it is useful for all cases: Bar, Bubble, Map, Pie, Polar, Donut, Scatter. I propose we start with Pie (as there is where you started) > push to production under the flag > test internally > once confirmed that all is ok add to the other visualisation types, in the same way, > push to all users without feature flag |
[#625] Fix order legend in map viz
Support documentation all set: https://lumensupport.akvo.org/article/show/85897-visualisation-colours-and-legend |
[#625] Fix order legend scatter impl
Just for sake of keeping the updates also on the issue. The map problem with the colours not matching and the scatter plot one too are now resolved. However, when the order of values is changed in other visualisations (like bar) it is not applied. WiP and needs to be handled before we can push to users. |
After another test round on dark-demo we are good to go |
[#625] Adapt order legend to StackedBarChart
[#625] Release orderLegend feature
Context
Currently, items in a legend are shown in alphabetical order. However, this does not always make sense, especially with ordinal data types, as shown below.
Proposed solution
Proposed solution is to allow users to change the order of the items in the legend, for example as part of the UI where they specify the colours for each item.
The text was updated successfully, but these errors were encountered: