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

Divide By Zero In Scatter Plot With All Points Y Value Below Zero #36

Open
kevinkey opened this issue Mar 26, 2015 · 0 comments
Open

Divide By Zero In Scatter Plot With All Points Y Value Below Zero #36

kevinkey opened this issue Mar 26, 2015 · 0 comments

Comments

@kevinkey
Copy link

In the version 1.5.9, I've found there are a few places with "/(this.chartLines-1)", which can result in a divide by zero. It was happening to me when I had a scatter plot with a set of points all less than zero. I simply did a find and replace for that string with "/Math.max(1, this.chartLines-1)". It fixed my problem, but I'm not 100% sure that that is the best solution. Perhaps the expression shouldn't be "/(this.chartLines-1)", and should be "/(this.chartLines)", which would have also prevented the divide by zero.

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

No branches or pull requests

1 participant