Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was thinking of cases like this, where a diverging scheme is specified, but the scale type is not specified and it defaults to linear. It would be nice, when appropriate, to default to a diverging scale instead so that it is symmetric around zero.
https://observablehq.com/@violetr/30daychartchallenge-day-13-correlation
I did this by checking for whether the scheme is a diverging scheme, and whether a pivot is specified or whether the domain includes zero. The nice thing is that most of our tests that specify a diverging scale now merely need to specify a diverging scheme, though there were a couple tests that use a diverging scheme without a meaningful pivot (e.g., for temperature or IMDb rating where you want a diverging scheme simply for “low” and “high”).