Skip to content

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}}).

@mbostock mbostock merged commit ca6fb81 into main Jun 16, 2024
@mbostock mbostock deleted the mbostock/no-literal-color-tip branch June 16, 2024 01:40
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

3 participants