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

better sorting of color by legend #1291

Closed
jbell-cdph opened this issue Feb 18, 2021 · 2 comments
Closed

better sorting of color by legend #1291

jbell-cdph opened this issue Feb 18, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@jbell-cdph
Copy link

If there are a lot of values in the color-by trait, it can be difficult to find the one of interest, because the order of the list appears random. If the values were sorted in some easy-to-recognize way, it would be easier to find the strains of interest.

I would like for there to be a way for the order of values in the color-by legend to be sorted, either by default or by choice.

An example of a problematic case is attached. It took me a minute to find B.1.1.7 in this list, for instance.

pango_legend_madness

@jbell-cdph jbell-cdph added the enhancement New feature or request label Feb 18, 2021
@jameshadfield
Copy link
Member

jameshadfield commented Feb 18, 2021

👍 currently the legend is ordered using counts (i.e. B.1.2 has the most occurances in the tree), which is sometimes ideal and sometimes not! There are a few improvements possible here, some on our side and some available to the dataset maintainer:

(1) If pangolin is added to the json.meta.filters array, then one can quickly filter the dataset via the sidebar typing-based UI to "pangolin B.1.1.7".

(2) It's on my to-do list to make all colorings automatically available as filters (in the sidebar UI) so hopefully this will be up in the next few days

(3) If you define a scale for a coloring then the legend ordering reflects this. Really useful for traits where you have not too many values - for pangolin it would require a small script to generate the list & colours I think.

@trvrb
Copy link
Member

trvrb commented Jul 4, 2021

Thanks for the feedback @jbell-cdph. I'm hopeful that (1) + (3) above resolve this issue for you. On live https://nextstrain.org/ncov/global?c=pango_lineage, the legend is properly sorted and you can quickly filter to B.1.1.7 as @jameshadfield suggests. But please let us know if this is not sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants