} else {
orientation = ORIENTATION_DEFAULT;
}
if ( HORIZONTAL_ORIENTATION.equals( orientation ) ) {
YAxis yaxis = new YAxis();
if ( labels != null ) {
// BISERVER-3075: must reverse the category labels on hbar
// charts due to bug in OFC2.
String[] reversedLabels = new String[labels.length];
int reversedLabelCount = 0;
for ( int i = reversedLabels.length - 1; i >= 0; i-- ) {
reversedLabels[reversedLabelCount++] = labels[i];
}
yaxis.setLabels( reversedLabels );
}
yaxis.setStroke( domainStroke );
yaxis.setColour( domainColor );
yaxis.setGridColour( domainGridColor );
if ( domainMin != null && domainMax != null ) {
yaxis.setRange( domainMin.intValue(), domainMax.intValue(), stepforchart );
}
chart.setYAxis( yaxis );
return yaxis;
} else {