Search code examples
javaswingjfreechart

JFreeChart gap between legend labels


I've been using JFreeChart in order to plot some series but I have a doubt related to the space between the labels in the legend.

Does anyone know how to set a space between legends? For example, right now:

No space between legends

and this is how I want it to look like

space between legends

I'll appreciate your help.


Solution

  • Just go to the place in your code where the legend items are set, and change "2012" to

    "2012 ".