I am using Achartengine release 1.1.0. How do I get combined chart with stacked bar graph and line chart? I am able to get a simple bar & line chart by returning an intent as:
String[] types = new String[] { BarChart.TYPE, LineChart.TYPE };
Intent intent = ChartFactory.getCombinedXYChartIntent(context, dataset, renderer, types,
"Weather parameters");
Now instead of a simple BarChart as above, i would like to use a Stacked bar chart in combination with a line chart. Say I have a stacked bar with a set of 3 lists of values, one way I was able show a stacked bar graph in combination with line chart was by doing something like:
String[] types = new String[] { BarChart.TYPE, BarChart.TYPE, BarChart.TYPE, LineChart.TYPE }
Intent intent = ChartFactory.getCombinedXYChartIntent(context, dataset, renderer, types,
"Weather parameters");
The y-values of the 2nd and 3rd barcharts had to be updated by adding them to the y-values of the previous barchart to get a stacked effect. Is there a way of using a stacked bar chart directly instead of doing it this way ? I looked at achartengine's SalesStackedBarChart example, they get a stacked bar by returning the following intent:
return ChartFactory.getBarChartIntent(context, buildBarDataset(titles, values), renderer,
Type.STACKED)
However I cannot figure how to use the Type.STACKED with ChartFactory.getCombinedXYChartIntent(..)