Null cells will be omitted from the data table json response (replaced with
commas ,,,)
http://www.google.com/codesearch/p?hl=en#aLJwv4TSmDw/trunk/src/java/com/google/visualization/datasource/render/JsonRenderer.java&q=JsonRenderer.java%20package:http://google-visualization-java%5C.googlecode%5C.com&sa=N&cd=1&ct=rc&t=1&l=258

<http://www.google.com/codesearch/p?hl=en#aLJwv4TSmDw/trunk/src/java/com/google/visualization/datasource/render/JsonRenderer.java&q=JsonRenderer.java%20package:http://google-visualization-java%5C.googlecode%5C.com&sa=N&cd=1&ct=rc&t=1&l=258>As
for null rows, I am quite sure you can omit them from the json response but
it seems that the library does not do that for you.

ChartMan

On Fri, Feb 5, 2010 at 4:54 AM, carlos <[email protected]> wrote:

> Sorry, I don't quite follow.  I'm using the Java namespace
> com.google.visualization.datasource.datatable to generate a data table
> that will get output as json.  The only way I see to build a table is
> to addRow(Row r).  and the only way to build a row, is to serially add
> cells. r.addcell().  Am I missing something?  Is there a way to set
> the value of a certain cell?
>
> -Carlos
>
> On Feb 4, 2:28 am, ChartMan <[email protected]> wrote:
> > don't add anything to rows/cells that are empty. This will result in
> empty
> > sections of the json.
> > E.g., {v:1},,,,,,,,,{v:2}
> >
> > ChartMan
> >
> >
> >
> > On Thu, Feb 4, 2010 at 6:44 AM, carlos <[email protected]> wrote:
> > > I am writing a datasource in java to feed data to a scatterplot from a
> > > mysql database.  The data is sparse: not every column has a value for
> > > every row.  I can easily plot sparse data manually in javascript or in
> > > the java GWT by only setting certain values in a DataTable.  Is there
> > > a way to generate sparse data from a servlet with the Visualization-
> > > DataSource java API?
> >
> > > Using addCell to add an empty string to numerical data throws an
> > > error.
> >
> > > Thanks,
> > > Carlos
> >
> > > --
> > > 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]<google-visualization-api%[email protected]><google-visualization-
> api%[email protected] <api%[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]<google-visualization-api%[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