Menu

#816 CandlestickChart.getCategoryPlot() - ClassCastException

closed
General (896)
5
2007-12-18
2007-12-17
Anonymous
No

Bug in CandlestickChart.

Calling:

CategoryPlot plot = candlestickChart.getCategoryPlot();

Gives out:

Exception in thread "main" java.lang.ClassCastException: org.jfree.chart.plot.XYPlot
at org.jfree.chart.JFreeChart.getCategoryPlot(JFreeChart.java:814)
at
xxx...

Discussion

  • Nobody/Anonymous

    Logged In: NO

    *version 1.0.8a

     
  • David Gilbert

    David Gilbert - 2007-12-18

    Logged In: YES
    user_id=112975
    Originator: NO

    This is not a bug. You should call getPlot() and cast it to an XYPlot (given a candlestick chart). The getCategoryPlot() and getXYPlot() methods do the cast for you, but you still have to know which one to call - I should probably deprecate then remove those methods, they're not especially helpful.

     
  • David Gilbert

    David Gilbert - 2007-12-18
    • assigned_to: nobody --> mungady
    • status: open --> closed
     

Log in to post a comment.