Error in RotatedAxisLabels with empty chart

Help
2012-11-06
2013-01-13
  • Timothy Anyona
    Timothy Anyona
    2012-11-06

    If I have an empty chart and I'm using the RotatedAxisLabels postprocessor, an exception is thrown

    java.lang.IllegalArgumentException: The 'series' argument is out of bounds (0).
        at org.jfree.data.time.TimeSeriesCollection.getSeries(TimeSeriesCollection.java:298)
        at org.jfree.data.time.TimeSeriesCollection.getItemCount(TimeSeriesCollection.java:408)
        at de.laures.cewolf.cpp.RotatedAxisLabels.processChart(RotatedAxisLabels.java:57)
        at de.laures.cewolf.taglib.AbstractChartDefinition.getChart(AbstractChartDefinition.java:274)
        at de.laures.cewolf.taglib.ChartImageDefinition.ensureRendered(ChartImageDefinition.java:127)
        at de.laures.cewolf.taglib.ChartImageDefinition.getRenderingInfo(ChartImageDefinition.java:116)
        at de.laures.cewolf.taglib.tags.ChartImgTag.getRenderingInfo(ChartImgTag.java:211)
        at de.laures.cewolf.taglib.tags.ChartMapTag.doStartTag(ChartMapTag.java:114)
    

    Is it possible for this postprocessor not to thrown an exception for empty charts?

     
  • Ulf Dittmer
    Ulf Dittmer
    2012-11-07

    Yeah, that's an easy fix. I guess the thinking was that the JSP would suppress the chart altogether if no data was in it.

     
  • Ulf Dittmer
    Ulf Dittmer
    2012-11-07

    I've just uploaded a new version that fixes this problem.

     
  • Timothy Anyona
    Timothy Anyona
    2012-11-08

    Thanks.