Increase the length of line in legend in jfreechart

477 views Asked by At

I am rendering a line chart using JFreechart. I need help to modify legend which is being rendered by the JFree. I need to increase the length of line in legend area. Below image shows the current output.

enter image description here

Below images shows what I want to achieve

enter image description here

Thanks

1

There are 1 answers

0
user1520277 On BEST ANSWER

It can be done by using the code below:

XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer();
renderer.setLegendLine(new Line2D.Double(-20.0D, 0.0D, 20.0D, 0.0D));