Is there a way to include some arbitrary text in the legend in a JFreeChart PieChart? I know it\'s possible to assign a PieSectionLabelGenerator
in order to customi
Another possibility is to create a class implementing the interface org.jfree.chart.LegendItemSource
which provides all your additional legend items. Then you add your own LegendItemSource
to your LegendTitle
object (the only other item source is the PieChart).
chart.getLegend().setSources(sourcesContainingTheOriginalAndYourNewOne);
If you want to control where to place the legend items or in which orderm of each item source, you can override LegendTitle.