500 row limit with table visualization

876 views
Skip to first unread message

Bmo

unread,
Sep 13, 2011, 4:51:32 PM9/13/11
to Google Visualization API
Hey all,

I use the table visualization. My table show just 500 rows - instead
of more than 2500.

How can I get rid of this limitation?

I use that template
http://code.google.com/intl/de-DE/apis/chart/interactive/docs/gallery/table.html

Thank you very much
tj

Riccardo Govoni ☢

unread,
Sep 14, 2011, 2:46:57 AM9/14/11
to google-visua...@googlegroups.com

Where are you pulling data from? If it comes from fusion tables, they trim the output to 500 rows when queried using the Google Visualization API endpoint (you'd have to switch to their default API and do the format conversion on your own).

If not, then I'm not aware of other limitations that cut at 500 rows.

--R.

> --
> You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
> To post to this group, send email to google-visua...@googlegroups.com.
> To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
>

Bmo

unread,
Sep 14, 2011, 10:05:16 AM9/14/11
to Google Visualization API
Hey,

sorry that I didn't mention that.

Yes, I'm getting the data from fusion tables.

How can I switch to the default API?

Now, I am retrieving the data like this:

<script type="text/javascript" id="script">
google.load('visualization', '1', {'packages':['table']});

function changeData(partei) {

var queryText = encodeURIComponent("SELECT 'Location', 'Party' FROM
1160024");
var query = new google.visualization.Query('http://www.google.com/
fusiontables/gvizdata?tq=' + queryText);

query.send(getData);
}

function getData(response) {
var table = new
google.visualization.Table(document.getElementById('visualization'));
table.draw(response.getDataTable(), {showRowNumber: true});
}

</script>

Could you help me, fetching the data switching to the "default API"?

Thank you so much,
tj

On 14 Sep., 08:46, Riccardo Govoni ☢ <battleho...@gmail.com> wrote:
> Where are you pulling data from? If it comes from fusion tables, they trim
> the output to 500 rows when queried using the Google Visualization API
> endpoint (you'd have to switch to their default API and do the format
> conversion on your own).
>
> If not, then I'm not aware of other limitations that cut at 500 rows.
>
> --R.
> On Sep 13, 2011 9:52 PM, "Bmo" <bmom...@googlemail.com> wrote:> Hey all,
>
> > I use the table visualization. My table show just 500 rows - instead
> > of more than 2500.
>
> > How can I get rid of this limitation?
>
> > I use that template
>
> http://code.google.com/intl/de-DE/apis/chart/interactive/docs/gallery...

Riccardo Govoni ☢

unread,
Sep 14, 2011, 10:31:56 AM9/14/11
to google-visua...@googlegroups.com
The default API is what they call "SQL API" ( http://code.google.com/apis/fusiontables/docs/developers_guide.html ), so your url would look something like:

https://www.google.com/fusiontables/api/query?sql= + encodeURIComponent('your select statement');

This would return you a CSV, but you can have fusion tables answer in JSONP format by adding a jsonCallback paramter.  For example (with a datasource of mine):


As far as I know fusion tables SQL API is not capped by number of rows returned, so you should be able to get all your data in the json callback. The JSON format returned this way is not compatible with what the Google Visualization API expects, so from there you'd have to write some javascript to manually convert/load the json payload into a google.visualization.DataTable which you'll then use for your charts.

As usual, some advices if you want to operate this way:
- you might want to turn on pagination in your table visualization, as it may become slow when displaying / sorting / redrawing something in the order of thousands of rows (depending on the browser you're using).
- fetching a datasource of your size in JSONP format may have a non negligible size on the wire (a few hundreds Kbs, depending on how much data your fetching?), so beware of latency introduced by the transfer time.

-- R.
Reply all
Reply to author
Forward
0 new messages