how to plot a chart for Minutes and Seconds

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
kaganvir
Posts: 1
Joined: Fri Mar 10, 2006 8:02 am

how to plot a chart for Minutes and Seconds

Post by kaganvir » Fri Mar 10, 2006 8:07 am

hi

when using Second or Minute is get the following error.

org.apache.jasper.JasperException: You are trying to add data where the time period class is org.jfree.data.time.Second, but the TimeSeries is expecting an instance of org.jfree.data.time.Day.

Does chart only accept Day is there any way to use it for Second and Minute.

Divya
Posts: 34
Joined: Tue Mar 07, 2006 7:27 am
Location: Kerala,India

Post by Divya » Sat Mar 11, 2006 11:41 am

I think u might not have specified 'Minute.class' as argument in TimeSeries to generate chart with minutes ijn the x-axis.
like
TimeSeries series=new TimeSeries('some string',Minute.class)

and for second specify 'Second.class'

Try it
Regards
Divya

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 » Mon Mar 13, 2006 3:07 pm

Divya wrote:I think u might not have specified 'Minute.class' as argument in TimeSeries to generate chart with minutes ijn the x-axis.
like
TimeSeries series=new TimeSeries('some string',Minute.class)

and for second specify 'Second.class'
That is correct. I need to fix this so that the class is configured on the first add(), rather than in the constructor.

The mechanism exists to ensure that a TimeSeries contains only items with the same class of time period.
David Gilbert
JFreeChart Project Leader

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

leotreim
Posts: 6
Joined: Thu Jul 07, 2011 2:59 pm
antibot: No, of course not.

Re: how to plot a chart for Minutes and Seconds

Post by leotreim » Sun Jul 10, 2011 3:04 pm

Thank you guys.This solved my problem also. :) :) :) :) :) :)

Locked