Mpandroidchart: How to set a fixed x-axis zoom level?

Created on 20 Feb 2015  路  3Comments  路  Source: PhilJay/MPAndroidChart

I found how to set zoom to barchart, but scale depends on how many xValues are in chart. How to make chart scaled similar in different cases?

Most helpful comment

In the latest version, that is possible via

// limit the number of visible entries
chart.setVisibleXRange(...);
chart.invalidate();

All 3 comments

@PhilJay Can you help me, please?

In the latest version, that is possible via

// limit the number of visible entries
chart.setVisibleXRange(...);
chart.invalidate();

@PhilJay ty, but i made this via
regChart.setScaleMinima((float) data.getXValCount() / 17f, 1f);
regChart.zoom(-10f,0f,0,0);

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsengvn picture tsengvn  路  3Comments

SutharRohit picture SutharRohit  路  3Comments

blotfi picture blotfi  路  3Comments

OnlyInAmerica picture OnlyInAmerica  路  3Comments

JungYongWook picture JungYongWook  路  3Comments