1

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

user1520277
  • 59
  • 2
  • 11

1 Answers1

1

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));
pzaenger
  • 11,381
  • 3
  • 45
  • 46
user1520277
  • 59
  • 2
  • 11