-
Notifications
You must be signed in to change notification settings - Fork 436
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
y-axis rescale bug #192
Comments
axisystep: 4 doesn't always work either; try setting trendline to [0.83,0.81,0.84,0.84,0.82,0.82,0.83,0.84,0.84,0.8,0.82,0.82] |
The problem, i think, lies in snapEnds() I think, around line 760. There: if (t < to) {
t = round((to + .5) * Math.pow(10, i)) / Math.pow(10, i);
} This will add 0.5 to the calculated max which is 0.8 there; resulting in a value of 1.3 |
This seems to fix it, if (t < to) {
t = round((to + (.5 / Math.pow(10, i))) * Math.pow(10, i)) / Math.pow(10, i);
}
f = round((from - (i > 0 ? 0 : (.5 / Math.pow(10, i)))) * Math.pow(10, i)) / Math.pow(10, i); but I see more +/-.5 "magic" going on, so perhaps the original coder should have a look. |
I actually removed snapEnds because weird behaviors it causes...or because On Wed, Aug 7, 2013 at 8:04 AM, Alexander Hofstede <[email protected]
|
See: http://jsfiddle.net/alexman/vpGyL/844/
If you change the chart height to 99 instead of 100, the y-axis will suddenly show 0-0.8 instead of 0-0.3. This is incorrect.
If you stretch the y-axis by increasing the max-value var a bit, it will be ok again.
A workaround I found is setting an axisystep of 4, however this is not ideal.
The text was updated successfully, but these errors were encountered: