Jump to content

Using date in charts


carlosmbs

Recommended Posts

greetings,

 

I've been trying (hard) to find a way to have dates in charts.

My goal is to make a line chart where the X axis presents dates and the Y axis presents integer or float values. This should be something really simple to be done but appearently it isn't. Appearently iReport only allows Values convertible to Number.

Question one:

Is there any simple way to do this?

Instead of using the date, I passed an Integer corresponding to the number of seconds since "the epoch". Since it's an integer, iReport accepts it but I don't want it to show that integer in the chart but the date itself.

Question two:

Is there a way to use that integer value to draw the chart and convert that integer back to Date format to be printed in the X axis?

 

I thought this would be something simple but it's being a real challenge! Could anyone, please, help me?

Thank you

 

Carlos



Post Edited by carlosmbs at 08/03/2010 14:47



Post Edited by carlosmbs at 08/03/2010 15:17
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I know that many people has the same question that I do...

fortunately I found the answer.

unfortunately it's so stupidly easy :p for all those who had that question, forget the XYline chart. When you choose the chart type choose Time Series chart..... just have to scroll down. It may avoid you days of search and trying to invent stuff....

 

Link to comment
Share on other sites

Hi All,

I need to create a chart having timestamp in X axis and some integer values in Y axis.I have attached the csv file.Can anyone help me in getting the chart.What we need to enter in series expression,categry expression and value expression.The datatype is taking as java.lang.string for all the values and if i try to create chart it is giving error telling "caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: 

Cannot cast object 'ADDDNTOANSI41EXCPTION_16_16' with class 'java.lang.String' to class 

'java.lang.Integer'  "

Can anyone please help me out...please refer attached csv and xls files....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...