{
super.configureChart(chart);
final Plot plot = chart.getPlot();
final PiePlot pp = (PiePlot)plot;
final PieDataset pieDS = pp.getDataset();
pp.setDirection(rotationClockwise ? Rotation.CLOCKWISE : Rotation.ANTICLOCKWISE);
if ((explodeSegment != null) && (explodePct != null))
{
configureExplode(pp);
}
if (StringUtils.isEmpty(getTooltipFormula()) == false)
{
pp.setToolTipGenerator(new FormulaPieTooltipGenerator(getRuntime(), getTooltipFormula()));
}
if (StringUtils.isEmpty(getUrlFormula()) == false)
{
pp.setURLGenerator(new FormulaPieURLGenerator(getRuntime(), getUrlFormula()));
}
pp.setIgnoreNullValues(ignoreNulls);
pp.setIgnoreZeroValues(ignoreZeros);
if (Boolean.FALSE.equals(getItemsLabelVisible()))
{
pp.setLabelGenerator(null);
}
else
{
final ExpressionRuntime runtime = getRuntime();
final Locale locale = runtime.getResourceBundleFactory().getLocale();
final FastDecimalFormat fastPercent = new FastDecimalFormat(FastDecimalFormat.TYPE_PERCENT, locale);
final FastDecimalFormat fastInteger = new FastDecimalFormat(FastDecimalFormat.TYPE_INTEGER, locale);
final DecimalFormat numFormat = new DecimalFormat(fastInteger.getPattern(), new DecimalFormatSymbols(locale));
numFormat.setRoundingMode(RoundingMode.HALF_UP);
final DecimalFormat percentFormat = new DecimalFormat(fastPercent.getPattern(), new DecimalFormatSymbols(locale));
percentFormat.setRoundingMode(RoundingMode.HALF_UP);
final StandardPieSectionLabelGenerator labelGen = new StandardPieSectionLabelGenerator(pieLabelFormat,
numFormat, percentFormat);
pp.setLabelGenerator(labelGen);
final StandardPieSectionLabelGenerator legendGen = new StandardPieSectionLabelGenerator(pieLegendLabelFormat,
numFormat, percentFormat);
pp.setLegendLabelGenerator(legendGen);
}
if (StringUtils.isEmpty(getLabelFont()) == false)
{
pp.setLabelFont(Font.decode(getLabelFont()));
}
if (pieDS != null)
{
final String[] colors = getSeriesColor();
for (int i = 0; i < colors.length; i++)
{
if (i < pieDS.getItemCount())
{
pp.setSectionPaint(pieDS.getKey(i), parseColorFromString(colors[i]));
}
else
{
break;
}