ChartUtilities.createBarChart - fails (0.9.21)

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
iogan18tm
Posts: 24
Joined: Tue May 04, 2004 5:14 pm

ChartUtilities.createBarChart - fails (0.9.21)

Post by iogan18tm » Thu Sep 16, 2004 9:45 pm

Code: Select all

 JFreeChart chart = ChartFactory.createBarChart(
	            title,        // chart title
				null,               // domain axis label
	            null,
null,
				PlotOrientation.VERTICAL,
	            true,                     // include legend
	            true,                     // tooltips?
	            false                     // URL generator?  Not required...
	        );
raises

Code: Select all

java.lang.IllegalArgumentException: Null 'dataset' argument.
	at org.jfree.data.general.DatasetUtilities.findRangeExtent(DatasetUtilities.java:688)
	at org.jfree.chart.renderer.category.AbstractCategoryItemRenderer.getRangeExtent(AbstractCategoryItemRenderer.java:516)
	at org.jfree.chart.plot.CategoryPlot.getDataRange(CategoryPlot.java:2294)
	at org.jfree.chart.axis.NumberAxis.autoAdjustRange(NumberAxis.java:350)
	at org.jfree.chart.axis.NumberAxis.configure(NumberAxis.java:333)
	at org.jfree.chart.axis.Axis.setPlot(Axis.java:702)
	at org.jfree.chart.plot.CategoryPlot.<init>(CategoryPlot.java:368)
	at org.jfree.chart.ChartFactory.createBarChart(ChartFactory.java:546)
In docs third param (category dataset can be null).

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Sep 17, 2004 10:47 am

Thanks for the report. It's a bug that I'll try to get fixed for the next release.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked