如何在不刷新整个活动的情况下刷新android mpchart图

问题描述:

你好,我在我的项目中使用android MPAndroidChart库.我想刷新图表而不刷新活动页面.

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

谢谢.

在单击按钮或微调框时,只需调用一个方法即可更新图形:

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

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