I am creating a table using Google Visualization Data Source library.
I created the column like this:
ColumnDescription colDesc = new ColumnDescription("Date",
ValueType.DATE, "Date");
Now I am trying to create a row:
TableRow tr = new TableRow();
tr.addCell(new Date(2011, 11, 10));
However it seems the addCell only supports boolean, double and String
(along with TableCell and Value).
Trying to run it as string or something else produces an exception:
"Cell type does not match column type, at index: 0. Should be of type:
DATE"
How can I make the value a date so it can produce this: {v:new
Date(2011,11,29)} ?
Thanks in advanced,
Amir.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
Amir.
On Dec 13, 3:21 pm, Roni Biran <roni.bi...@gmail.com> wrote:
> Are you intending to use this for rendering JavaScript datatable or JSP
> etc.? If it's for JS purposes, you can render a regular string (all the
> way) and just call the eval function in your JS file. If it's for JSP you
> can use a TableCell definition with value and formattedValue
>
> TableCell(Value value, java.lang.String formattedValue)
> (http://code.google.com/apis/chart/interactive/docs/dev/dsl_javadocs/i...
Amir.--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/V4tq7i3YjHIJ.
Amir.--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/Pl196hgG55UJ.
I'm not sure that's possible.I played with it for a while but they have such a specific JSON format that I could not reproduce it using XStream and creating it just as text is not an option (too ugly for someone else to look at this code).
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/BZCo3aopMJoJ.
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/HqW7W7l4vRcJ.
Amir.--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/V4tq7i3YjHIJ.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.