使用 aChartEngine 获取饼图切片的值
我试图开发一个包含饼图的 Android 应用程序。我使用 aChartEngine 来生成图表,但问题是我无法触摸/单击饼图的特定部分并获取相关数据!有人知道获取这些数据的方法吗? 这是每个图表框架都有的一个简单的东西,但我在 javadoc 上找不到一些可以做到这一点的方法,我想知道这样的东西是否存在。 任何帮助都是宝贵的,提前致谢。
I was trying to develop an android app which contains a pie chart. I used aChartEngine to generate the graph but the thing is that I can't touch/ click a specific slice of the pie and get related data! Does someone knows a way to get that data?
It's a simple thing that every chart framework has but I can't find on javadoc some method that could do it and I'm wondering if such thing exists.
Any help would be precious, thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
该功能已在1.0.0版本中添加,您可以使用SeriesSelection类获取点索引、系列索引、值和x值。您可以使用 GraphicalView 图表的 getCurrentSeriesAndPoint() 获取一个实例。
This feature has been added in version 1.0.0, you can get point-index, series indes, value and x-value using SeriesSelection class. you can get an instance using getCurrentSeriesAndPoint() of your GraphicalView chart.
AChartEngine SVN 中的版本现在包含此功能。
您可以查看执行此操作的代码示例 这里。
担
The version in the AChartEngine SVN contains now this feature.
You can see an example of code doing this here.
Dan
根据 AChartEngine 作者的说法 - 它还尚未实现:
AChartEngine 讨论组
您可以添加功能请求。
According to the AChartEngine author - it's not implemented yet:
AChartEngine discussion group
You can a add a feature request.