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

tip ignores literal colors #2091

Merged
merged 1 commit into from
Jun 16, 2024
Merged

tip ignores literal colors #2091

merged 1 commit into from
Jun 16, 2024

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Jun 15, 2024

Fixes #2090. Uses a new channel.defaultScale field to record what the channel.scale would have been, if it weren’t for the specific values provided. This allows the tip mark to detect when a channel would have been associated with the color scale, but isn’t, and hence contains only literal color values that should not be shown (at least by default) in the tip.

Screenshot 2024-06-14 at 6 08 37 PM

@mbostock mbostock requested a review from Fil June 15, 2024 01:08
Copy link
Contributor

@Fil Fil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example in this PR would have displayed color: orange in the tips, which was not very informative.

There might be cases where you want the tip to display the actual color (for example if you are doing a visualization of colors) — this is possible by using the tip’s format option (e.g. tip: {format: {fill: true}}).

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.

When a color channel is specified in literal color values, it should be ignored by the tip mark
2 participants