Skip to content

fix zero for negative domains #934

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

Merged
merged 4 commits into from
Jun 13, 2022
Merged

fix zero for negative domains #934

merged 4 commits into from
Jun 13, 2022

Conversation

mbostock
Copy link
Member

Fixes #933, probably.

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.

Yes it does fix the original bug report. I've added a test case.

Plot.line(travelers, {x: "date", y: d => d.current / d.previous - 1, strokeWidth: 0.25, curve: "step"}),
Plot.line(travelers, Plot.windowY({x: "date", y: d => d.current / d.previous - 1, k: 7, stroke: "steelblue"}))
],
width: 960
Copy link
Member Author

Choose a reason for hiding this comment

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

Can you move this to the first line of the options? 😬

Fil and others added 2 commits June 13, 2022 20:51
Co-authored-by: Mike Bostock <mbostock@gmail.com>
@mbostock mbostock merged commit f60e7f3 into main Jun 13, 2022
@mbostock mbostock deleted the mbostock/fix-negative-zero branch June 13, 2022 19: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.

scale.zero option not useful for plotting negative numbers
2 participants