Hi,
I've tried to create an motionChart with date values.
I've a servlet that create the DataTable with date values. I've tried
this:
import com.ibm.icu.util.Calendar;
import com.ibm.icu.util.GregorianCalendar;
import com.ibm.icu.util.TimeZone;
//Creation of calendar for date type
GregorianCalendar calendar = new GregorianCalendar(2009, 2, 15);
calendar.setTimeZone(TimeZone.getTimeZone("GMT"));
System.out.println("calendar "+calendar);
Value v = new DateValue(calendar);
...
//Adding values to data adding date value
data.addRowFromValues("Desc", v, 1000, 300, "Ecomm")
This didn't worked and gave me a typemismatch error...then i find on
this blog
http://blake.tsuhakofamily.com/2009/07/google-visualization-api-java-servlets-date/
that the only solution to this problem is to create an add every
single cell...with this code:
TableRow tr = new TableRow();
tr.addCell("test1");
tr.addCell("http://www.google.com");
tr.addCell(2000);
tr.addCell(false);
DateValue d = new DateValue(2009, 11, 21);
tr.addCell(d);
data.addRow(tr);
I think that the method addRowFromValues doesn't work for DATE type.
I'm wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---