I am using MPChart Library. I have multiple linedatasets in my line chart. I want to animate them in linear order. Right now the animation starts simultaneously on all datasets in line chart. Thank you
Asked
Active
Viewed 324 times
1 Answers
0
chart.setData(lineData1);
chart.invalidate(); // refresh
refresh your data with some delay using Handler like
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
chart.setData(lineData2);
chart.invalidate(); // refresh
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
chart.setData(lineData3);
chart.invalidate(); // refresh
}
}, 1500);
}
}, 1500);

Hitesh Sarsava
- 666
- 4
- 15
-
I have multiple linedatasets not just two. So this solution does not work for me – S.Khan Apr 12 '18 at 13:13
-
so you can use timer for that to do this work for updating data in LineCharts. – Hitesh Sarsava Apr 12 '18 at 13:16