protected void handleCategoryPlotSettings(CategoryPlot p, JRChartPlot jrPlot)
{
Double defaultPlotLabelRotation = (Double)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_LABEL_ROTATION);
PlotOrientation defaultPlotOrientation = (PlotOrientation)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_ORIENTATION);
// Handle rotation of the category labels.
CategoryAxis axis = p.getDomainAxis();
boolean hasRotation = jrPlot.getLabelRotationDouble() != null || defaultPlotLabelRotation != null;
if(hasRotation)
{
double labelRotation = jrPlot.getLabelRotationDouble() != null ?
jrPlot.getLabelRotationDouble().doubleValue() :
defaultPlotLabelRotation.doubleValue();
if (labelRotation == 90)
{
axis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_90);
}
else if (labelRotation == -90) {
axis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
}
else if (labelRotation < 0)
{
axis.setCategoryLabelPositions(
CategoryLabelPositions.createUpRotationLabelPositions( (-labelRotation / 180.0) * Math.PI));
}
else if (labelRotation > 0)
{
axis.setCategoryLabelPositions(
CategoryLabelPositions.createDownRotationLabelPositions((labelRotation / 180.0) * Math.PI));
}
}
if(defaultPlotOrientation != null)