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

Add "Label By" dropdown for labeling nodes by attributes other than name #1201

Closed
batson opened this issue Aug 27, 2020 · 3 comments · Fixed by #1246
Closed

Add "Label By" dropdown for labeling nodes by attributes other than name #1201

batson opened this issue Aug 27, 2020 · 3 comments · Fixed by #1246
Labels
enhancement New feature or request

Comments

@batson
Copy link

batson commented Aug 27, 2020

Context
We would like to be able to label nodes with attributes other than their name. Uses:

  • A user has drag-and-dropped a file linking public identifiers to patient names onto auspice, and they would like to label the nodes by the patient names.
  • Nodes have multiple name-like fields, such as the public GISAID name, a lab accession number, and an ID used by a partner institution. It would be useful to toggle between them.
  • When an attribute has too many values for the color to be legible, as is the case with Admin Division in current ncov builds, labels with that attribute would be easy to read.
  • A user who wants to see two attributes simultaneously could use one as a color and the other as the label. For example. facility name and worker/resident status. Currently, one has to rapidly toggle the color and squint to compare two sets of attributes at once.

Description
An additional dropdown box called "Label By", under "Color By", in the navigation panel on the left, with the default set to Name. Attributes would appear in the drop-down. When selected, the nodes would be labelled by the value of the attribute instead of the current name field.

Open question: should these be specified separately in the JSON as a labelings field? For backwards compatibility, we could also use the union of filters and colorings OR simply the full set of node attributes if labels is not specified. Many name-like fields might not make sense as colorings or filters, so having an option to specify a might offer a better user experience.

@batson batson added the enhancement New feature or request label Aug 27, 2020
@batson batson changed the title Add dropdown for changing node labels from name to any other attribute Add dropdown for changing node labels from name to other node attributes Aug 27, 2020
@batson batson changed the title Add dropdown for changing node labels from name to other node attributes Add "Label By" dropdown for labeling nodes by attributes other than name Aug 27, 2020
@sidneymbell
Copy link
Contributor

Bumping this :)

@allenkj2
Copy link

I would love to see this as well. It would be great to be able to choose a label, and also great to be able to turn off labels altogether if things are too cluttered.

@jameshadfield
Copy link
Member

It's in the queue 😉

and also great to be able to turn off labels altogether if things are too cluttered

Yup -- this is #916 -- also in the queue 😉

jameshadfield added a commit that referenced this issue Dec 18, 2020
Adds an additional dropdown box to allow users to change the attribute used as tip labels. This is similar in design to the branch label drop down.

Currently attributes are limited to the colorings. The function which collects these, `collectAvailableTipLabelOptions` could be easily extended to produce further valid attributes.

This should pave the way for smarter and more customisable logic around _when_ labels are displayed, and the dropdown should not be shown in the situation that labels aren't shown.

For a full description, see #1201
Closes #1201
jameshadfield added a commit that referenced this issue Dec 20, 2020
Adds an additional dropdown box to allow users to change the attribute used as tip labels. This is similar in design to the branch label drop down.

Currently attributes are limited to the colorings. The function which collects these, `collectAvailableTipLabelOptions` could be easily extended to produce further valid attributes.

This should pave the way for smarter and more customisable logic around _when_ labels are displayed, and the dropdown should not be shown in the situation that labels aren't shown.

For a full description, see #1201
Closes #1201
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

Successfully merging a pull request may close this issue.

4 participants