Skip to content
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

Closed
mtwestra opened this issue Mar 1, 2017 · 14 comments
Closed

Custom order of items in legend #625

mtwestra opened this issue Mar 1, 2017 · 14 comments

Comments

@mtwestra
Copy link
Contributor

mtwestra commented Mar 1, 2017

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.

screen shot 2017-03-01 at 10 02 58

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.

@janagombitova janagombitova changed the title Maps - custom order of items in legend Custom order of items in legend Mar 4, 2019
@janagombitova
Copy link

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).

screenshot 2019-03-04 at 11 40 20

In this case, the lowest range should go first and the highest last to make it easier to read the legend and associated colours.

@Kiarii
Copy link

Kiarii commented Sep 9, 2019

Based on the assumption that there are a ltd number of categories on which to apply a custom order, we could

  • introduce a legend-category-order-editor where the user opts for a custom order ad can use a drag and drop to arrive at the desired order as illustrated..
  • determine whether we refer to this as categories or values and word the UI accordingly
    image

tangrammer added a commit that referenced this issue Aug 7, 2020
tangrammer added a commit that referenced this issue Aug 7, 2020
tangrammer added a commit that referenced this issue Aug 7, 2020
tangrammer added a commit that referenced this issue Aug 7, 2020
tangrammer added a commit that referenced this issue Aug 7, 2020
Uses orderedLegend feature-flag

insert into environment(id, "value") VALUES('orderedLegend', 'true'::jsonb);

||

update environment set "value"='true'::jsonb where id='orderedLegend'
tangrammer added a commit that referenced this issue Aug 10, 2020
@janagombitova
Copy link

@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

@janagombitova
Copy link

tangrammer added a commit that referenced this issue Aug 19, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
[#625] Fix order legend scatter impl
tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
@janagombitova
Copy link

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.

tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
tangrammer added a commit that referenced this issue Aug 20, 2020
@janagombitova
Copy link

After another test round on dark-demo we are good to go

tangrammer added a commit that referenced this issue Aug 21, 2020
[#625] Adapt order legend to StackedBarChart
tangrammer added a commit that referenced this issue Aug 24, 2020
tangrammer added a commit that referenced this issue Aug 25, 2020
[#625] Release orderLegend feature
tangrammer added a commit that referenced this issue Aug 25, 2020
tangrammer added a commit that referenced this issue Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants