3

I using the 2.0.8 release of MPAndroidChart

When consecutively zoom in the y-axis, the y values are repeated.

I checked the sample project:

When normal display:

enter image description here

When zoom in the y-axis:

enter image description here

When zoom again:

enter image description here

And the same happens in my project, the values in the y-axis is repeated when zoom consecutively.

How to fix this? By the time I do not show the y-axis in the chart.

mlozdev
  • 137
  • 1
  • 4
  • 12

1 Answers1

2

The reason therefore is quite simple. The values actually aren't repeated, however, they lack the number of digits to show you they aren't.

What I can recommend you to do is either:

  • Set a ValueFormatter that uses more digits by default
  • Create an intelligent ValueFormatter that bases the number of digits on the zoom level

The ValueFormatter that is created by default is not recreated upon zooming and therefore always shows the same number of digits.

Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187