CategoryPlot plot = chart.getCategoryPlot();
CategoryItemRenderer renderer = plot.getRenderer();
boolean hasChanged = false;
for (int i=0; i<mapperSources.size(); ++i) {
if (ds.equals(mapperSources.get(i))) {
ColorMapper cm = (ColorMapper)mappers.get(i);
if (cm!=null) {
Paint p1 = hasChanged ? null : renderer.getSeriesPaint(i);
renderer.setSeriesPaint(i,cm.getPaint(ds,index));
// check colors only if useful => when one color changed, don't check the others
if (!hasChanged) {
Paint p2 = renderer.getSeriesPaint(i);
if (!p1.equals(p2)) hasChanged = true;
}