Don't use simple labels as they may overlap
Instead, use labels that are rendered outside of the chart and 'linked' with the corresponding pie chart piece via a thin line.
This commit is contained in:
@@ -35,7 +35,6 @@ public class AccountGroupExpensesGenerator extends AbstractChartGenerator<Accoun
|
|||||||
final NumberFormat percentInstance = NumberFormat.getPercentInstance(LocaleContextHolder.getLocale());
|
final NumberFormat percentInstance = NumberFormat.getPercentInstance(LocaleContextHolder.getLocale());
|
||||||
final PiePlot plot = (PiePlot) chart.getPlot();
|
final PiePlot plot = (PiePlot) chart.getPlot();
|
||||||
|
|
||||||
plot.setSimpleLabels(true);
|
|
||||||
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}: {1} ({2})", currencyInstance, percentInstance));
|
plot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}: {1} ({2})", currencyInstance, percentInstance));
|
||||||
|
|
||||||
return chart;
|
return chart;
|
||||||
|
|||||||
Reference in New Issue
Block a user