Wrong number of arguments in method error

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sergio

Wrong number of arguments in method error

Post by sergio » Thu Nov 21, 2002 3:02 pm

When I tried to create a JFreeChart object from a jsp page, I tried to use the method JFreeChart chart = ChartFactory.createGanttChart("Gantt Chart","Task","Date", dataset, true, false); it sends this error:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred between lines: 4 and 14 in the jsp file: /gantt.jsp

Generated servlet error:
C:\Apache\work\Standalone\localhost\chart\gantt$jsp.java:69: Wrong number of arguments in method.
JFreeChart chart = ChartFactory.createGanttChart("Gantt Chart","Task","Date", dataset, true, false);
^

Dave Gilbert

Re: Wrong number of arguments in method error

Post by Dave Gilbert » Fri Nov 22, 2002 11:54 am

There should be either one boolean (to control whether the legend is visible) or three booleans (legend, tooltips and URL generation for image maps) at the end of the parameter list. You have only two, so the error message is accurate...

Regards,

DG

Locked