Skip to content

Fix offsets not adjusted on autoscale - #5251

Closed
yaugenka wants to merge 1 commit into
PhilJay:masterfrom
yaugenka:patch-5
Closed

yaugenka wants to merge 1 commit into
PhilJay:masterfrom
yaugenka:patch-5

Conversation

@yaugenka

@yaugenka yaugenka commented Jan 26, 2022

Copy link
Copy Markdown

Fixes #5237, Fixes #2826.

calculateOffsets needs to be called after computeAxis because the size of labels can change after the latter.
Also the view port handler needs to be refreshed after that to take the new offsets into account.

@Paget96

Paget96 commented Dec 11, 2022

Copy link
Copy Markdown

I really like this library and using it in my apps, I would like to call people to continue with this awesome thing. I have forked the repo and started working on it! So I am ready as well to accept pull requests, I'll notify other people from here as well!
Would be more than happy if we continue with this awesome project.

Code is full kotlin now!

Make your pull requests here:
https://github.com/Paget96/MPAndroidChart

@PhilJay

PhilJay commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Thank you. This is in 4.0.0-beta01: the offsets are recomputed after the axis labels, so an auto-scaling chart is no longer a frame behind while panning. 4.0 is a rewrite in Kotlin, so the Java sources this patch touches no longer exist and it cannot be merged as it stands. It was reimplemented rather than merged, so the credit is yours.

https://github.com/PhilJay/MPAndroidChart/releases/tag/v4.0.0-beta01

@PhilJay PhilJay closed this Sep 20, 2026
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.

Y-axis gets shfted on data reload when autoscale is enabled Inconsistency of AxisMax and AxisMin

3 participants