Re: Attach dynamic data to Google visualization

549 views
Skip to first unread message

asgallant

unread,
Aug 3, 2012, 10:27:51 PM8/3/12
to google-visua...@googlegroups.com, Myself
Fetching data from your database involves more than just changing the URL in a Query - your server has to have a script set up to interpret the query and return data in the appropriate format.  The visualization team built JSP and python libraries for doing that, and there are threads on this forum about putting data from a database into a JSON representation of a DataTable in PHP.

As far as the 404 error goes, I'd have to see your complete js code to see what might be the problem.

On Friday, August 3, 2012 8:43:35 AM UTC-4, Nutan Ranee wrote:
Hello,
I'm new for using Google APIs and is looking for a snippet which could help me out in using goggle visualization API. My motive is to add dynamic data instead of using data from spreadsheets. The API which I was using looks for getting data from remote could not explain this(ref : Setting the Query from JavaScript
 Collapse | Copy Code
https://developers.google.com/chart/interactive/docs/querylanguage#Setting_the_Query_in_the_Data_Source_URL).
I added a datasource url but it gives me an error as Microsoft JScript runtime error: google.visualization.Query: Not Found [404]. Please help me in getting remote data from my database instead of spreadsheets.
Thanks in advance.
Nutan

Nutan Ranee

unread,
Aug 6, 2012, 12:49:38 AM8/6/12
to google-visua...@googlegroups.com, Myself
Can you please provide me an example for providing URL in a Query, I guess the url which I was giving was wrong. There was no connection established and hence it was giving me 404 Bad request.

asgallant

unread,
Aug 6, 2012, 11:53:54 AM8/6/12
to google-visua...@googlegroups.com, Myself
This uses a query: http://code.google.com/apis/ajax/playground/?type=visualization#data_source_request 

Set the URL in the Query object constructor.

Nutan

unread,
Aug 6, 2012, 12:01:44 PM8/6/12
to google-visua...@googlegroups.com, Myself
What if a try to connect using connection string for sql server database? In this case what would be its connection string datasource url.

--
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/-/y_fQeQsUaMYJ.

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.



--
Nutan R

asgallant

unread,
Aug 6, 2012, 12:35:02 PM8/6/12
to google-visua...@googlegroups.com, Myself
Chances are, you cannot connect directly to a SQL server database, as the API doesn't have any support for directly querying databases; you have to have some intermediary script that parses your query, queries the database, and returns the requested data into the requisite JSON format.

If you have a SQL server interface already set up, then you might be better off using a custom AJAX call to the server and handling all the formatting client-side.

To post to this group, send email to google-visualization-api@googlegroups.com.
To unsubscribe from this group, send email to google-visualization-api+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.



--
Nutan R

bsef0...@pucit.edu.pk

unread,
Jun 2, 2013, 9:42:36 AM6/2/13
to google-visua...@googlegroups.com
hey please can u give some useful links for sql server query...m using sql database and want to access data from table..

To post to this group, send email to google-visua...@googlegroups.com.

To unsubscribe from this group, send email to google-visualization-api+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.



--
Nutan R

bsef0...@pucit.edu.pk

unread,
Jun 2, 2013, 9:53:38 AM6/2/13
to google-visua...@googlegroups.com, Myself, nutan...@gmail.com
but that is just for data source of spreadsheets...have u any link for ata source of sql server atabase

asgallant

unread,
Jun 2, 2013, 11:39:10 PM6/2/13
to google-visua...@googlegroups.com, Myself, nutan...@gmail.com
One user wrote a library for ASP.net and ASP.net MVC, if you are using either of those to access SQL Server.  This blog post may also be helpful.

MUHAMMAD ASIMARSHAD

unread,
Jun 3, 2013, 6:09:33 AM6/3/13
to google-visua...@googlegroups.com
ok thanks, i will check it out


--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/tJ5jX1qy69g/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.

To post to this group, send email to google-visua...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages