I am Using achartEngine to plot stacked bar-graph.My plot for X an Y Values are overlapping and plot with Lesser value than the other is squeezed out.Below is my builddataset and chartfactory
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;
}
my chartfactory:
mChartView = ChartFactory.getBarChartView(NTViewGraph.this, buildBarDataset(titles, values), renderer,
Type.STACKED);
As per given link:
I hope this will help you.