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/index.html?com/google/visualization/datasource/datatable/ColumnDescription.html
)




On Mon, Dec 12, 2011 at 7:32 PM, amirmiller <[email protected]> wrote:

> Hi,
>
> 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
> [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.
>
>

-- 
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.

Reply via email to