Skip to content

Conversation

@mbostock
Copy link
Member

@mbostock mbostock commented Jun 13, 2022

With initializers (and perhaps with identity scales), it’s possible that a channel that is normally associated with a scale does not have an associated scale. In this case the mark should handle the scale being undefined instead of crashing. It’s also technically possible that the associated scale could be the wrong type, but this shouldn’t be the responsibility of the mark to check.

This also adds an assertion to prevent initializers from declaring position scales. This is not currently supported because position scales affect default dimensions and axes; constructing or modifying a position scale in an initializer would hence not be correctly reflected in the defaults. We may support this in the future, but for now it’s safer to have an explicit error.

Fixes #918. Previously #936 #930 #929 #927. 😓

@mbostock mbostock requested a review from Fil June 13, 2022 19:27
Co-authored-by: Philippe Rivière <[email protected]>
@mbostock mbostock merged commit 90d2238 into main Jun 13, 2022
@mbostock mbostock deleted the mbostock/dodge-ticks branch June 13, 2022 22:05
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.

Dodge error message for non-dodgeable marks could be improved

3 participants