How to create Barchart with colored bars and defined width?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
JFreeGuest
Posts: 4
Joined: Wed Jul 02, 2008 9:34 pm

How to create Barchart with colored bars and defined width?

Post by JFreeGuest » Thu Jul 03, 2008 6:28 pm

Hello,

I'm new to Jfree and want to create a Bar Chart with red (negative values) and blue (positive values) bars and define the minimal width of the bars. Which dataset and renderers I have to use for this?

At the moment I'm using the HistogramDataset where I can color the data series (with XYPlot -> XYItemRenderer -> setSeriesPaint()) but I cannot find the possibility to define the minimal width of the bars (directly or indirectly).

Thanks for help.

JFreeGuest
Posts: 4
Joined: Wed Jul 02, 2008 9:34 pm

Post by JFreeGuest » Thu Jul 03, 2008 9:15 pm

It would be allready enought to me to be able to set the width of blue and red bars to the same width. Any solutions?

The problem how I see it, is that the ranges of the negative and positve values are different. So the width of the red and blue bars are different too. Is it in any way possible to set the axis ranges for the datasets?

Locked