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

Apply clipping to first column of legend #1328

Merged
merged 1 commit into from
May 24, 2021
Merged

Conversation

jameshadfield
Copy link
Member

@jameshadfield jameshadfield commented Mar 30, 2021

We have had issues in the past with legend values from column 1 overflowing into column 2. For instance, issue #899 was fixed by PR #914 which implemented a maximum character limit for legend names. That solution could produce misleading views, such as those described in #1306.

The solution from this PR is to implement a clipping mask for column 1, avoiding the complication of limiting the string size. Column 2 already has similar behaviour because the SVG element of the legend itself performs the clipping.

Closes #1306

@jameshadfield jameshadfield temporarily deployed to auspice-legend-overflow-luaruk March 30, 2021 23:57 Inactive
We have had issues in the past with legend values from column 1 overflowing into column 2. For instance, issue #899 was fixed by PR #914 which implemented a maximum character limit for legend names. This solution can produce misleading views, such as those described in #1306.

This solution implements a clipping mask for column 1, avoiding the complication of limiting the string size. Column 2 already has similar behaviour because the SVG element of the legend itself performs the clipping.
@jameshadfield
Copy link
Member Author

Tested using various datasets & colorings (including genotype) on nextstrain.org

@jameshadfield jameshadfield merged commit 797090f into master May 24, 2021
@jameshadfield jameshadfield deleted the legend-overflow-text branch May 24, 2021 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Legend items are limited to 5 genotypes
1 participant