If you're using a JS file, why are you using the Data Source Library? This
is a Java library.
Use a regular DataTable definition, with date cell type.


On Wed, Dec 14, 2011 at 11:35 AM, amirmiller <[email protected]> wrote:

> It's for regular js.
> When I use the string value it treats the date as string and doesn't
> sort properly.
>
> Amir.
>
> On Dec 13, 3:21 pm, Roni Biran <[email protected]> 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.
> ..
> > )
> >
> >
> >
> >
> >
> >
> >
> > 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.
>
>

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