Android 对于堆叠条形图,achartengine X和Y图相互重叠?
我正在使用achartEngine绘制堆叠条形图。我对X和Y值的绘制是重叠的,并且比另一个值小的绘制被挤出。下面是我的builddataset和chartfactoryAndroid 对于堆叠条形图,achartengine X和Y图相互重叠?,android,achartengine,Android,Achartengine,我正在使用achartEngine绘制堆叠条形图。我对X和Y值的绘制是重叠的,并且比另一个值小的绘制被挤出。下面是我的builddataset和chartfactory protected XYMultipleSeriesDataset buildBarDataset(String[] titles, List<double[]> values) { XYMultipleSeriesDataset dataset = new XYMultipleSeriesDatas
protected XYMultipleSeriesDataset buildBarDataset(String[] titles, List<double[]> values) {
XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
int length = titles.length;
for (int i = 0; i < length; i++) {
CategorySeries series = new CategorySeries(titles[i]);
double[] v = values.get(i);
int seriesLength = v.length;
for (int k = 0; k < seriesLength; k++) {
series.add(v[k]);
}
dataset.addSeries(i,series.toXYSeries());
}
return dataset;
}
根据给定链接:
http://community.developer.motorola.com/t5/MOTODEV-For-Enterprise/Enterprise-Grade-Charts-part-II/ba-p/23420
Use below methods and pass 0 to that methods.
If you set it to 0 then it will not show any label and shows label that is externally set by You. And if you pass 1 then it shows 1 label in the interval of 10.
renderer.setXLabels(0);
renderer.setYLabels(0);
我希望这对你有帮助
http://community.developer.motorola.com/t5/MOTODEV-For-Enterprise/Enterprise-Grade-Charts-part-II/ba-p/23420
Use below methods and pass 0 to that methods.
If you set it to 0 then it will not show any label and shows label that is externally set by You. And if you pass 1 then it shows 1 label in the interval of 10.
renderer.setXLabels(0);
renderer.setYLabels(0);