Note that there are some explanatory texts on larger screens.

plurals
  1. POError with a class customiser for charts
    text
    copied!<p>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!</p> <p>the code:</p> <pre><code> public void customize(JFreeChart jfc, JRChart jrc) { CategoryPlot myPlot = jfc.getCategoryPlot(); HorizontalCategoryAxis axis = (HorizontalCategoryAxis)myPlot.getDomainAxis(); axis.setVerticalCategoryLabels(true); } </code></pre> <p>the error is:</p> <pre><code> cannot find symbol : Class HorizontalCategoryAxis </code></pre> <p>Also I have tried:</p> <pre><code> 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); </code></pre> <p>and the errors:</p> <p><strong>cannot find symbol</strong> appear for the line :</p> <pre><code>renderer.setLabelGenerator(generator); </code></pre> <p>and </p> <p><strong>no suitable constructor</strong> for </p> <pre><code>XYItemLabelGenerator generator2 </code></pre> <p>my reference is:</p> <p><a href="http://files.blogjava.net/hao446tian/jfreechart-1.0.1-US_developer_guide.pdf" rel="nofollow noreferrer">http://files.blogjava.net/hao446tian/jfreechart-1.0.1-US_developer_guide.pdf</a></p> <p><strong>UPDATE</strong> Still I can't see the categorieExpression( on the Y axis) :(((</p> <p><img src="https://i.stack.imgur.com/QFtw9.jpg" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload