Hi,
I am having problem trying to format the x-axis value. I want the dates to be displayed verically in the dd-mm-yy format
When I use this:
DateTickUnit dateUnit = new DateTickUnit(DateTickUnit.DAY, 1, new java.text.SimpleDateFormat("dd/mm/yy"));
axis.setTickUnit(dateUnit);
the program compiles but throws a ServletException. The error msg says:
root cause
java.lang.NoSuchMethodError: com.jrefinery.chart.HorizontalDateAxis.setTickUnit(Lcom/jrefinery/chart/DateTickUnit;)V
at client.LineGraph.doPost(LineGraph.java:97)
....
.
.
and when I add this line:
axis.getTickLabelFormatter().applyPattern("dd-MMM-yyyy");
I get the following compilation error :
root cause
java.lang.NoSuchMethodError: com.jrefinery.chart.HorizontalDateAxis.setTickUnit(Lcom/jrefinery/chart/DateTickUnit;)V
at client.LineGraph.doPost(LineGraph.java:97)
What is even more baffling is when I say
axis.setAutoTickUnitSelection(true);
the date axis range from 7-Jan-2002 to 8-Jul-2002 .
My SQL query clearly states a different date range.
String frmDate = "01/06/2002";
String toDate = "30/06/2002";
Where is it getting the above dates from and what can I do to fix my problem? Your help is much appreciated.
Thanks
--malad--
problem with displaying x-axis date values
Re: problem with displaying x-axis date values
sorry! the compilation error that I get is :
LineGraph.java:97: cannot resolve symbol
symbol : method tickLabelFormatter ()
location: class com.jrefinery.chart.HorizontalDateAxis
axis.tickLabelFormatter().applyPattern("dd-MMM-yyyy");
^
1 error
LineGraph.java:97: cannot resolve symbol
symbol : method tickLabelFormatter ()
location: class com.jrefinery.chart.HorizontalDateAxis
axis.tickLabelFormatter().applyPattern("dd-MMM-yyyy");
^
1 error
Re: problem with displaying x-axis date values
Hi there!
Could someone throw me some pointers for the above mentioned problems?
I'd be very much appreciated.
Thanks.
malad
Could someone throw me some pointers for the above mentioned problems?
I'd be very much appreciated.
Thanks.
malad
Re: problem with displaying x-axis date values
There is no method tickLabelFormatter() in JFreeChart, so your compiler is correct to report an error.
Regards,
Dave Gilbert
Regards,
Dave Gilbert