|| numDatasets != datasetRenderOrder.length) {
datasetRenderOrder = new int[numDatasets];
}
int d = 0;
Focus focus = plot.getFocus();
// all unfocused barcharts first
for (int i = 0; i < numDatasets; i++) {
DatasetRenderer<T> renderer = drawableDatasets.get(i).getRenderer();
if (renderer instanceof BarChartXYRenderer && (focus == null
|| focus.getDatasetIndex() != i)) {
datasetRenderOrder[d++] = i;
}
}
// next render unfocused non-barcharts
for (int i = 0; i < numDatasets; i++) {
DatasetRenderer<T> renderer = drawableDatasets.get(i).getRenderer();
if (!(renderer instanceof BarChartXYRenderer) && (focus == null
|| focus.getDatasetIndex() != i)) {
datasetRenderOrder[d++] = i;
}
}
// finally render the focused series