I have created a Stacked area chart. In the chart vertical white lines appear. I need to remove the vertical white lines. How can this be done. An image link is attached.
Asked
Active
Viewed 1,159 times
5
-
1Please edit your question to include an [sscce](http://sscce.org/) that exhibits the problem you illustrate. – trashgod Oct 30 '12 at 16:03
-
Cross-posted [here](http://www.jfree.org/forum/viewtopic.php?f=3&t=115913). – trashgod Oct 31 '12 at 13:03
3 Answers
1
Heyy Vegeta now you will fly in sky ... I have a solution for your problem.
Override the StackedAreaRenderer to draw the path in single path. Basically the chart is drawn by combining two polygons, the polygons are alternate left and right so if you make left = right polygon there will not be any gaps. It worked out for me, you also give a try. I hope your boss will be happy now.
Here is the trick
GeneralPath left = new GeneralPath();
GeneralPath right = left;

Neeraj
- 1,776
- 2
- 16
- 35
-
Works fine. This code has to be replaced in the class `StackedXYAreaRenderer2`. – Thomas Arnaud Sep 01 '16 at 13:51
0
Follow this lines:
JFreeChart objChart = ChartFactory.createStackedBarChart(
title,
titleX,
titleY,
objDataset,
PlotOrientation.VERTICAL,
true,
true,
false
);
CategoryPlot plot = (CategoryPlot) objChart.getPlot();
BarRenderer renderer = ((BarRenderer) plot.getRenderer());
renderer.setBarPainter(new StandardBarPainter());
StandardBarPainter Style dont have "white line"

C. Santander
- 1
- 1