How to refresh android mpchart graph without refreshing whole activity

穿精又带淫゛_ 提交于 2020-04-07 10:34:34

问题


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

Thanks in advance.


回答1:


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

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


来源:https://stackoverflow.com/questions/47303952/how-to-refresh-android-mpchart-graph-without-refreshing-whole-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!