MPAndroidChart - How to change ValueFormatter while zooming?
<p>I am using MPAndroidChart library. I am using a CustomValueFormatter which formats the Float values such that their precision is 1.</p>

<p><strong>CustomValueFormatter Code:</strong></p>

<pre><code>public class CustomYAxisValueFormatter implements YAxisValueFormatter {

    private DecimalFormat mFormat;

    public CustomYAxisValueFormatter() {
        mFormat = new DecimalFormat("###,###,###,##0.0"); // sets precision to 1
    }

    @Override
    public String getFormattedValue(float value, YAxis yAxis) {
        return mFormat.format(value);
    }
}
</code></pre>

<p>I am setting the formatter to y-axis.</p>

<p><strong>Setting the formatter:</strong></p>

<pre><code>    YAxis yAxis = lineChart.getAxisLeft(); //show left y-axis line        
    yAxis.setValueFormatter(new CustomYAxisValueFormatter()); // set value formatter to format y-values.
</code></pre>

<p>As a result of <code>setValueFormatter(YAxisValueFormatter)</code>, the above formatter <code>(CustomYAxisValueFormatter)</code> is created by default.</p>

<p>The problem is CustomYAxisValueFormatter can't be recreated upon zooming, thereby resulting in repetitive y-values.</p>

<p>Is it possible to create a CustomValueFormatter that changes precision of values based on the zoom level ?</p>