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

Temporal scales don't work in scatterplots #1835

Closed
jameshadfield opened this issue Aug 28, 2024 · 1 comment · Fixed by #1836
Closed

Temporal scales don't work in scatterplots #1835

jameshadfield opened this issue Aug 28, 2024 · 1 comment · Fixed by #1836
Labels
bug Something isn't working

Comments

@jameshadfield
Copy link
Member

Current Behavior

Colourings with a temporal scale (except for num_date) do not work in scatterplots, with NaNs appearing in the SVG coordinates, e.g.:

Error: <path> attribute d: Expected number, "MNaN 472.09999999…".

They should behave similarly to how num_date currently does, however all nodes without metadata values (usually all internal nodes and perhaps some tips) should not appear. Scatterplots already have the ability to hide nodes which don't have appropriate metadata (e.g.).

This was first identified in #1832 but it predates that PR.

How to reproduce

  1. Create a dataset with a temporal scale (values can be numerical or, if you're using a version of Auspice more recent than c585722 they can be YYYY-MM-DD)

  2. View a scatterplot with the temporal scale as the x or y axis.

@jameshadfield jameshadfield added the bug Something isn't working label Aug 28, 2024
@jameshadfield
Copy link
Member Author

Whoops, this behaviour is unique to the YYYY-MM-DD temporal values introduced in #1832, my mistake. If the values themselves are numeric then we get the appropriate behaviour, e.g. this for rabies divergence vs sampling year:

image

jameshadfield added a commit that referenced this issue Aug 28, 2024
Closes #1835

This code would be greatly enhanced by using TypeScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant