本文介绍了AchartEngine注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我到处看,唯一的信息,我能找到说,通过以下code到屁股它们
everywhere i look, the only information I can find says to ass them via the following code
series.addAnnotation("Hello!!", 1, 1);
然而,当我在code尝试(使用适当的系列名称)我得到一个错误消息,指出不支持addAnnotation。是否有人可以清除这件事给我吗?谢谢!
However, When I try it in my code (with the proper series name) I get an error message that says addAnnotation is not supported. Can someone please clear this up for me? thanks!
推荐答案
您必须下载最新版本的库。例如,让夜晚构建从这里。
You must download a recent version of the library. For example, get the night build from here.
在你的code,替换最后一行(一个在您返回图表视图)其中:
In your code, replace the last line (the one where you return the chart view) with:
XYMultipleSeriesDataset dataset = buildBarDataset(titles, values);
XYSeries series = dataset.getSeriesAt(0);
series.addAnnotation("Vacation", 6, 30);
return ChartFactory.getBarChartView(context, dataset, renderer, Type.STACKED);
这篇关于AchartEngine注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!