MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

How to set chart position?

Open hram opened this issue 9 years ago • 4 comments

How can I add for example 100 items in chart but display only last 10. I new about visible range. In my case visible range might be between 10 and 100 I need scroll chart and zoom it.

If I load 100 items then all of them displayed on chart. Can you help me?

hram avatar Jan 17 '17 07:01 hram

You want to move to the end of the chart and make it scrollable?

Try this:

chart.setVisibleXRange(10, 10);
chart.moveViewToX(chart.getXChartMax())

JStav avatar Jan 18 '17 21:01 JStav

this is not right for me setVisibleXRange() method call setMinMaxScaleX() and after this I cant zoom/pinch chart

I need make it scrollable and zoomable

hram avatar Jan 19 '17 06:01 hram

Hi,I have the same problem,were you able to solve this issue?

hysheng avatar Nov 08 '18 03:11 hysheng

@hysheng this is absolutely possible, please look at the existing documentation and examples. I'm working on some new documentation as well, hopefully that will be available soon. But for now, you should be able to figure it out by checking the examples.

almic avatar Nov 11 '18 15:11 almic