-
Notifications
You must be signed in to change notification settings - Fork 93
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
AutoRangePadding changes data point values instead of increasing axis range #469
Comments
Hey, thanks for the bug report. In #466 we fixed another problem with the combination of autoGrowRanging and axisPadding. Did you take a look at that PR and the sample submitted with it? I'm away from my IDE at the moment, but from looking at the code, the main difference seems to be that you add the data and then only afterwards add the chart to the scenegraph. What probably happens is that the axis is drawn and only afterwards rescaled to the data range and this new (correct) range is used for rendering the sine wave. |
Hello, thanks for the fast response. Just to clarify, the problem is still present when running the provided PaddedAutoGrowAxisSample.java. So the difference between the implementations should not be the reason for the error. |
Indeed, the rendering of the axis tickmarks doesn't seem to take the padding into account. Previously this was not a problem, because the padding was applied to the general axis limits, but this lead to other problems. I'll try to come up with a fix for this. |
solves #469 by also using the computed autoRange() result which includes the padding when calculating the tick marks.
solves #469 by also using the computed autoRange() result which includes the padding when calculating the tick marks.
solved in #470 |
Describe the bug
In the newly released version 11.2.6 when adding AutoRangePadding to an Axis the axis range isn't increased instead the shown data-points changes value.
A sine-curve with the amplitude 40 and no padding.
The same sine-curve but with 0.3 (30%) padding. As can clearly be seen the axis-range doesn't increase, instead the sine-waves amplitude is decreased.
To Reproduce
The problem is visible in the PaddedAutoGrowAxisSample.java, but can also be reproduced by creating a simple sine-wave and adding AutoRangePadding.
Environment:
The text was updated successfully, but these errors were encountered: