We noticed this by setting custom colors: if a (middle) bar has value 0, the smal line (for value 0) will be shown in the color that is set for the last bar.
We analyzed the issue and found that we could replicate with the following steps:
A) Create a DefaultCategoryDataset object containing the following values:
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(10, "BUG", "A");
dataset.addValue(20, "BUG", "B");
dataset.addValue(0, "BUG", "C");
dataset.addValue(10, "BUG", "D");
B) Create the WaterfallBarChart object using the ChartFactory class and passing
in the dataset created in step 1.
C) Use ChartUtilities to save the chart as a JPEG file. Notice that the colour of the 3rd column (C) matches the colour of the last bar.
We are working on fixing this issue and will submit it to the developer mailing list for review soon.
Thank you for positing this issue.
I've committed the fix for this, to be included in the upcoming JFreeChart 1.0.17 release.
Log in to post a comment.