MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

Entries wrong

Open 13006210190 opened this issue 9 years ago • 1 comments

When i refresh the line chart with less mAxis.mEntries ,the Xaxis item index was wrong . a3f5205c-7e3a-44c2-a666-f2c108dd0bfb if (mAxis.mEntries.length > n) ,there not new float[] .

13006210190 avatar Dec 05 '16 11:12 13006210190

Here's how I did it

public class ReuseYAxisRenderer extends YAxisRenderer {

    public ReuseYAxisRenderer(ViewPortHandler viewPortHandler, YAxis yAxis, Transformer trans) {
        super(viewPortHandler, yAxis, trans);
    }

    @Override
    protected void computeAxisValues(float min, float max) {
        mAxis.mEntries = new float[]{};
        super.computeAxisValues(min, max);
    }
}

shs8023you avatar Nov 10 '23 08:11 shs8023you