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

https://www.google.com/fusiontables/api/query?sql=select%20col0%2C%20col1%2C%20col4%2C%20col6%20from%20680149&jsonCallback=myCallback

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.

On 14 September 2011 15:05, Bmo <[email protected]> wrote:

> 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 ☢ <[email protected]> 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" <[email protected]> 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...
> >
> > > Thank you very much
> > > tj
> >
> > > --
> > > 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