if(size > 3)
colorStep = 255 / (size - 3);
for(int i = 0; i < size; i++)
{
JRMeterInterval interval = (JRMeterInterval)intervals.get(i);
Range intervalRange = convertRange(interval.getDataRange());
double intervalLowerBound = ChartThemesUtilities.getTruncatedValue(intervalRange.getLowerBound(), dialUnitScale);
double intervalUpperBound = ChartThemesUtilities.getTruncatedValue(intervalRange.getUpperBound(), dialUnitScale);
Color color = i < 3
? (Color)ChartThemesConstants.AEGEAN_INTERVAL_COLORS.get(i)
: new Color(255 - colorStep * (i - 3), 0 + colorStep * (i - 3), 0);
ScaledDialRange dialRange =
new ScaledDialRange(
intervalLowerBound,
intervalUpperBound,
interval.getBackgroundColor() == null
? color
: interval.getBackgroundColor(),
12f
);
dialRange.setInnerRadius(0.41);
dialRange.setOuterRadius(0.41);
dialPlot.addLayer(dialRange);