Loading...

google-visualization-api@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [visualization-api] Merging 2 datatables with identical columns Riccardo Govoni ☢ Fri Sep 30 15:00:32 2011

Could you write them out using the
ToJSon<http://code.google.com/apis/chart/interactive/docs/dev/gviz_api_lib.html#tojsonexample>
instead
of ToJSonResponse ? This would serialize a plain json object for each
datatable. In the browser, you could load these json objects, easily merge
them together (join their 'rows' array together, assuming the columns'
definitions are the same) and create a single datatable out of the joined
json payload.

-- R.

On 28 September 2011 21:29, Elco Jacobs <[EMAIL PROTECTED]> wrote:

> I am generating datatables in a python script on a DD-WRT router. The
> script will generate datatables of up to 5000 rows. The memory on the
> router is limited, so the datatables grow too large and the router
> crashes.
> To prevent this from happening, I want to create a new datatable each
> day and write these to separate JSON response files with
> datatable.ToJSonResponse().
>
> When a page is loaded in a web browser, these JSON response files have
> to be loaded and combined into one chart in javascript.
>
> I can iterate over the JSON response files and read them into
> datatables, but I cannot find a way to append one datatable to
> another.
>
> The addRows() function is almost what I need, but it cannot accept an
> entire datatable as input.
>
> Can anybody help me on how to merge the two datatables into one
> datatable so I can create a combined chart?
>
> --
> 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.