MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

setVisibleYrange() does not change if given a low value and then high value.

Open zivkest opened this issue 11 years ago • 1 comments

I have taken the example activity LineActivity1 from the example and added a button and a text field to test this issue, in the text field i input a number, on button click i set setVisibleYrange() by the given number.

when i set a number lower then the max value, the method is working correctly, however, when i try after this, to set a number higher then the first, to zoom out on the y scale, nothing happens. here is the code i added to LineActivity1 to test this:

findViewById(R.id.change).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { EditText t = (EditText) findViewById(R.id.edit); int vis = Integer.valueOf(t.getText().toString()); mChart.setVisibleYRange(vis, YAxis.AxisDependency.LEFT); mChart.notifyDataSetChanged(); mChart.invalidate(); } });

please help.

zivkest avatar May 18 '15 06:05 zivkest

Nothing happens beacuse this is not a zoom method. It just restrains the maximum visible area.

PhilJay avatar May 18 '15 15:05 PhilJay