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

rohitkumarbhagat picture rohitkumarbhagat  路  3Comments

AiTheAnswer picture AiTheAnswer  路  3Comments

andreyfel picture andreyfel  路  3Comments

vishvendu picture vishvendu  路  3Comments

galex picture galex  路  3Comments