Using DateAxis and XYBarRenderer with double values

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tomkieffer
Posts: 24
Joined: Wed May 16, 2007 8:20 am

Using DateAxis and XYBarRenderer with double values

Post by tomkieffer » Thu May 28, 2009 11:09 am

Hi,

I'm often using a DateAxis with a DefaultXYDataset. I store the long values representing the timestamps in the double array that is passed to DefaultXYDataset.addSeries(). With XYLineAndShapeRenderer this works really fine and I appreciate that DateAxis "understands" the doubles as dates.
The problem comes up when I use an XYBarRenderer. It makes the bars as thin as possible, see the image below, and I don't see how to change this.

Image

I suppose it is because DateAxis interprets the values as actual values for the given millisecond.
Is there an easy way to influence the bar width or do I need to change the Dataset or the Renderer?

Locked