#902 Missing Methods

1.0.x
closed
General (896)
5
2008-12-31
2008-12-31
No

In an attempt to use the following code fragment from your Developers Guide; I found the the eccential methods required to excute this code fragmentdo not exist in your clas structure.

Code Fragment:
CategoryItemRenderer renderer = plot.getRenderer();
CategoryItemLabelGenerator generator = new StandardCategoryItemLabelGenerator(
"{2}", new DecimalFormat("0.00"));
renderer.setLabelGenerator(generator);

The getRenderer() method does not exist in the current build if you could have this oversight corrected in your next build.

Discussion

  • David Gilbert

    David Gilbert - 2008-12-31
    • assigned_to: nobody --> mungady
    • status: open --> closed
     
  • David Gilbert

    David Gilbert - 2008-12-31

    In this context, the 'plot' needs to be an instance of CategoryPlot in order to access that method. Note that if you call getPlot() on the JFreeChart instance, it will return a reference of type Plot - you then have to cast that to the appropriate subtype (e.g. CategoryPlot or PiePlot or XYPlot or whatever type of plot your chart uses).

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks