Hello
How could i use the DynamicDataDemo.java example to plot
horizontal bars instead of points?
Urgent help is required....
Thanks in advance
Gaurav Kathotia
DynamicDataDemo
Re: DynamicDataDemo
gaurav kathotia wrote:
> How could i use the DynamicDataDemo.java example to plot
> horizontal bars instead of points?
The DynamicDataDemo class uses a TimeSeriesCollection. You can use this to plot a VerticalXYBarChart...just change the call to ChartFactory.createTimeSeriesChart(...) to ChartFactory.createVerticalXYBarChart(...).
But there isn't a HorizontalXYBarChart yet, so you can't use TimeSeriesCollection for horizontal bars.
You could use the horizontal bar chart that is based on a CategoryDataset, but then you would need to rewrite lots more code since TimeSeriesCollection does not implement CategoryDataset.
Regards,
DG.
> How could i use the DynamicDataDemo.java example to plot
> horizontal bars instead of points?
The DynamicDataDemo class uses a TimeSeriesCollection. You can use this to plot a VerticalXYBarChart...just change the call to ChartFactory.createTimeSeriesChart(...) to ChartFactory.createVerticalXYBarChart(...).
But there isn't a HorizontalXYBarChart yet, so you can't use TimeSeriesCollection for horizontal bars.
You could use the horizontal bar chart that is based on a CategoryDataset, but then you would need to rewrite lots more code since TimeSeriesCollection does not implement CategoryDataset.
Regards,
DG.