I want to customise my charts so I want to use a class customiser, I have used the following code to change the categorie label to vertical , but I don't know why it generate an error!
the code:
public void customize(JFreeChart jfc, JRChart jrc) {
CategoryPlot myPlot = jfc.getCategoryPlot();
HorizontalCategoryAxis axis = (HorizontalCategoryAxis)myPlot.getDomainAxis();
axis.setVerticalCategoryLabels(true);
}
the error is:
cannot find symbol : Class HorizontalCategoryAxis
Also I have tried:
CategoryItemRenderer renderer = (CategoryItemRenderer) plot.getRenderer();
CategoryItemLabelGenerator generator = new StandardCategoryItemLabelGenerator("{2}", new DecimalFormat("0.00"));
renderer.setLabelGenerator(generator);
renderer.setItemLabelsVisible(true);
XYItemRenderer renderer2 = (XYItemRenderer) plot.getRenderer();
XYItemLabelGenerator generator2 = new StandardXYItemLabelGenerator("{2}", new DecimalFormat("0.00"));
renderer.setLabelGenerator(generator);
and the errors:
cannot find symbol appear for the line :
renderer.setLabelGenerator(generator);
and
no suitable constructor for
XYItemLabelGenerator generator2
my reference is:
http://files.blogjava.net/hao446tian/jfreechart-1.0.1-US_developer_guide.pdf
UPDATE Still I can't see the categorieExpression( on the Y axis) :(((