更换AChartEngine的饼图的数据 [英] Replace the data of AChartEngine's piechart

查看:219
本文介绍了更换AChartEngine的饼图的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用绘图饼图 ACartENgine 。我想,以取代饼图的数据。要更换我叫 mSeries.clear(); 方法来删除所有旧的数据,然后添加新的数据集 mSeries
但我的问题是,而做到这一切我传说以白色为主色调,而不是类别颜色显示。如何避免这一问题。我想要的是用新的值替换饼图的数据。有没有更好的主意。我怎样才能做到这一点?任何一个请帮我。

I am drawing piechart using ACartENgine . And I want to replace the data of piechart. To replace I called mSeries.clear(); method to remove all old data and then add new dataset to mSeries. But my problem is while do this all my legends displayed in white color instead of category color. How can I avoid this problem. All I want is replace the data of piechart with new values. Is there any better idea. How can I achieve this? Any one please help me.

先谢谢了。

推荐答案

有一个设置(INT指数,弦乐标题,双值)方法在 CategorySeries 类,你可以使用。

There is a set(int index, String title, double value) method in the CategorySeries class that you can use.

只要确保你使用可用的最新版本<一个href=\"https://repository-achartengine.forge.cloudbees.com/snapshot/org/achartengine/achartengine/1.1.0/\"相对=nofollow>这里。

Just make sure you are using the latest version available here.

这篇关于更换AChartEngine的饼图的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆