Has anyone else experienced problems with setSeriesPaint using the VerticalCategoryPlot (for a bar graph)?
The problem I am having:
I have 2 data series, one has data the other has null data.
The color from the null series ends up being the visible color drawn and the color of the next series (the one with data) is not visible.
I do not have this problem when I use setSeriesPaint on the same data using XYPlot (for a line graph).
I've stepped through the code and the color's that I assign to each series are the colors that are associated with the correct series when I debug them. It just seems as though the plot drawing doesn't understand the null part...or something anyways....I guess if I knew what exactly was going on behind the scenes I wouldn't be posting!
Thanks for your time.
Stacey
problem with setSeriesPaint and VerticalCategoryPlot
Re: problem with setSeriesPaint and VerticalCategoryPlot
Hi Stacey,
Can you post some more details? The version of JFreeChart, the code you use to create the dataset, and the code you use to set the series paint.
There shouldn't be much that can go wrong, but I'm happy to investigate...
Regards,
DG
Can you post some more details? The version of JFreeChart, the code you use to create the dataset, and the code you use to set the series paint.
There shouldn't be much that can go wrong, but I'm happy to investigate...
Regards,
DG
Re: problem with setSeriesPaint and VerticalCategoryPlot
I don't know if my code will help or overload the message so I tried with a demo you supplied.
(LineChartrDemo1.java)
I tried the function: (aprox line 140)
plot.setSeriesPaint(new Paint[] { Color.cyan, Color.orange, Color.pink});
and the demo came up with series colored as red, green, blue.
I have come to the conclusion the seriesPaint is not working for more than just the category series like I previously thought.
Any ideas?
Again, I am using the latest from CVS as of today.
Thanks again!
Stacey
(LineChartrDemo1.java)
I tried the function: (aprox line 140)
plot.setSeriesPaint(new Paint[] { Color.cyan, Color.orange, Color.pink});
and the demo came up with series colored as red, green, blue.
I have come to the conclusion the seriesPaint is not working for more than just the category series like I previously thought.
Any ideas?
Again, I am using the latest from CVS as of today.
Thanks again!
Stacey
Re: problem with setSeriesPaint and VerticalCategoryPlot
I believe I've determined my problem. There seems to be some new functionality of a PaintTable being added. I had missed this in the updates but now have found it. I was able to get all of my XYItemRenderer to use the assigned series color using the setFillPaintTable function instead of setSeriesPaint. (It seems as though these are changes being made for the implementation of dual axis support).
I still had a problem using the CategoryItemRender. I had to add the function
public void setFillPaintTable(com.jrefinery.chart.PaintTable table);
to the interface in order to get category type items to be able to also have a paintTable. I'm sure this is just something that has not been checked in yet. Thought it may be useful info for anyone who works with the CVS head.
Thanks,
Stacey
I still had a problem using the CategoryItemRender. I had to add the function
public void setFillPaintTable(com.jrefinery.chart.PaintTable table);
to the interface in order to get category type items to be able to also have a paintTable. I'm sure this is just something that has not been checked in yet. Thought it may be useful info for anyone who works with the CVS head.
Thanks,
Stacey
Re: problem with setSeriesPaint and VerticalCategoryPlot
Hi Stacey,
You are correct. The CVS code is in a bit of a "halfway" state at present, I checked in the lookup tables for the series colors without removing the old setSeriesPaint(...) methods. It is all part of the dual axis code.
Right now I am working on a new release of JFreeReport (for the end of this week), but I will get back to JFreeChart and tidy it up soon...
Regards,
DG
You are correct. The CVS code is in a bit of a "halfway" state at present, I checked in the lookup tables for the series colors without removing the old setSeriesPaint(...) methods. It is all part of the dual axis code.
Right now I am working on a new release of JFreeReport (for the end of this week), but I will get back to JFreeChart and tidy it up soon...
Regards,
DG