Hi, it would be helpful if you could give the error that the data.addRow
throws, as without it it's a bit harder to track down exactly what is wrong
with the code.

- Sergey



On Fri, Dec 21, 2012 at 8:34 AM, ah89 <[email protected]> wrote:

> Hey,
>
> This is what I am trying to accomplish:
>
> public DataTable generateDataTable() {
>         DataTable data = new DataTable();
>         data.addColumn(new ColumnDescription("Metric", ValueType.TEXT,
> "Metric"));
>         data.addColumn(new ColumnDescription("Statistic",
> ValueType.NUMBER, "Statistic"));
>
>         TableRow row = new TableRow();
>         row.addCell("Pizza");
>         row.addCell(20.0);
>
>         try {
>             data.addRow(row);
>         } catch (TypeMismatchException e) {
>             e.printStackTrace();
>         }
>
>         return data;
>       }
> }
>
> The line with 'data.addRow(row)' gives an internal server error, but I
> have no idea why.
> My goal is to use the DataTable without the use of an extra google-servlet
> (the examples use:
>
> SimpleExampleServlet extends DataSourceServlet).
>
>
> How can I create a datatable, that will be saved in a request?
>
> Thanks in advance
>
> --
> 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/-/TBKpeEGclpIJ.
> 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