MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Y axis calculate max and min label not depend the current view point data, but all the data set?

Open Mike-bel opened this issue 3 years ago β€’ 1 comments

I have a chart with a scrolled axis, then I set chart with code:

setAutoScaleMinMaxEnabled(true);

but the max and min value of y axis is not calculated by the current draw area, but all the dataset.

Then the result appears like below pictures:

ζˆͺ屏2022-02-10 δΈ‹εˆ4 55 55

When the chart shrinks by touched, like this:

ζˆͺ屏2022-02-10 δΈ‹εˆ4 56 18

The problem is the first pictures: the chart is so too crowded on y axis direction because the max and min label on y axis is not adjusted by the current visible left and right data.

How to resolve this problem, please?

Mike-bel avatar Feb 10 '22 09:02 Mike-bel

Do you disable mAxisLeft or mAxisRight? If you don't want to show the label in YAxis, you can set isDrawLabelsEnabled as false rather than disable it.

VinsonGuo avatar Feb 17 '22 08:02 VinsonGuo