0

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

S.Khan
  • 71
  • 1
  • 7

1 Answers1

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