The code should respect a null value for HorizontalDateAxis "label" field.
For instance when some one creates a gantt chart as
chart = ChartFactory.createGanttChart(null,null,null,Data,true);
then we get an exception:
java.lang.NullPointerException:
at java.awt.Font.getLineMetrics(Font.java:1353)
at com.jrefinery.chart.HorizontalDateAxis.reserveAxisArea(HorizontalDateAxis.java:510)
at com.jrefinery.chart.HorizontalCategoryPlot.draw(HorizontalCategoryPlot.java:298)
at com.jrefinery.chart.JFreeChart.draw(JFreeChart.java:582)
at com.jrefinery.chart.JFreeChart.draw(JFreeChart.java:461)
at ganttie.draw(ganttie.java:215)
at ganttie.doGet(ganttie.java:196)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
etc...
Under FreeBSD with native jdk13 (green threads, classic vm) it just
produces the exception.
Under the same system with linux-jdk13 the JVM (jboss) dies.
HorizontalDateAxis.java:510 in jfreechart0.9.2
Re: HorizontalDateAxis.java:510 in jfreechart0.9.2
Hi Achilleus,
I made a change just before releasing 0.9.3 on SourceForge...can you let me know if it solves the problem?
Regards,
DG
I made a change just before releasing 0.9.3 on SourceForge...can you let me know if it solves the problem?
Regards,
DG
Re: HorizontalDateAxis.java:510 in jfreechart0.9.2
I am afraid, i dont have time at the moment.
But you can simply call the code i posted and try it out.
(IntervalCategoryDataset is populated by the code in GanttDemo).
But you can simply call the code i posted and try it out.
(IntervalCategoryDataset is populated by the code in GanttDemo).