Stacked Bar charts And Dates in X-axis

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Chi

Stacked Bar charts And Dates in X-axis

Post by Chi » Wed Jan 30, 2002 12:00 am

DG,

I am trying to create Vertical Stacked Bar charts/ Vertical Bar charts, But I want the dates to be on the X axis and the Values (From my DB) to be on the Y axis. Just like you have it for your Time Series charts in the demo.

I will really appreciate it, if can get some poitnters

Thanks
Chi.

Chi

RE: Stacked Bar charts And Dates in X-axis

Post by Chi » Wed Jan 30, 2002 12:04 am

Hi DG,

I forgot to mention that this class "createStackedVerticalBarChart" only takes categoryDataset object, Any way to pass a TimeSeriesCollection object that way I'll be able to map my data to my dates better.

createStackedVerticalBarChart(java.lang.String title, java.lang.String categoryAxisLabel, java.lang.String valueAxisLabel, CategoryDataset data, boolean legend)


Thanks
Chi

David Gilbert

RE: Stacked Bar charts And Dates in X-axis

Post by David Gilbert » Wed Jan 30, 2002 10:02 am

Hi Chi,

You can only create stacked bar charts using a CategoryDataset (one axis shows categories, the other shows values).

You can display ordinary bar plots using time series data (via the IntervalXYDataset interface, which is implemented by TimeSeriesCollection) - in this case both axes are numerical (the dates are converted to milliseconds). But there's no facility yet for stacking the bars...it would be a good project for someone wanting to contribute code to JFreeChart.

Regards,

DG.

Locked