How to refresh android mpchart graph without refreshing whole activity

Viewed 9022

Hello i am using android MPAndroidChart library in my project. I want to refresh chart without refreshing activity page.

Thanks in advance.

1 Answers

Where ever upon button click or spinner selection you need to update your graph just call a method:

chartView.notifyDataSetChanged();
chartView.invalidate();
Related