Search code examples
javachartsjfreechart

JfreeChart: Need to remove vertical white lines in stackedareachart


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.

vertical lines


Solution

  • 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;