250756621 / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Please provide a Series Bar Chart #165

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please provide a bar chart where each color/legend/etc can be configurable.

The actual dataSet setup should be identical to a PieChart.

So now I have:

CategorySeries dataset = new CategorySeries("");
for (int i = 0; i < this.data.getPoints().size(); i++) {
    SeriesChartPoint point = this.data.getPoints().get(i);
    dataset.add(point.getLabel().toString(), point.getAmount().doubleValue());

   SimpleSeriesRenderer simpleSeriesRenderer = new SimpleSeriesRenderer();
   simpleSeriesRenderer.setColor(ChartConstants.COLORS[i % ChartConstants.COLORS.length]);
    renderer.addSeriesRenderer(simpleSeriesRenderer);
}

return ChartFactory.getPieChartView(context, dataset, renderer);

I should be able to just replace the last line with:

return ChartFactory.getSeriesBarChartView(context, dataset, renderer);

Original issue reported on code.google.com by zvasv...@gmail.com on 11 Jan 2012 at 6:15

GoogleCodeExporter commented 9 years ago
Take my +1 for this.
http://www.artfulbits.com/articles/samples/aicharts/sample-viewer.aspx?sample=co
lumnsample - here is the example.
This feature is very needed!

Original comment by buckel...@gmail.com on 30 Jun 2012 at 2:11