Ok I will explain my doubt again I am writting this servlet code http://code.google.com/apis/visualization/documentation/dev/dsl_csv.html#intro the url to execute is /CsvDataSourceServlet?url=http://localhost:8084/WebApplication1/F2.csv When i execute this code i get output result on my browser ... I am not understanding how that code is opening my browser and showing {c:[{v:'Bob'},{v:'Jane'}]}]}}); etc etc why is this happening , why is the browser opening to show result can we figure out something from this code http://code.google.com/apis/visualization/documentation/dev/dsl_csv.html#intro
were F2.csv is my *.csv file
now after executing the code I have to display the result which i have to do using the javascript code as follows All Examples
// Load the Visualization API and the ready-made Google table visualization. google.load('visualization', '1', {'packages':['annotatedtimeline']}); // Set a callback to run when the API is loaded. google.setOnLoadCallback(init); // Send the queries to the data sources. function init() { //var query = new google.visualization.Query('simpleexample?tq=select name,population'); //query.send(handleSimpleDsResponse); var query = new google.visualization.Query('CsvDataSourceServlet?url=http://localhost:8084/WebApplication1/**F2.csv**'); query.send(handleCsvDsResponse); } // Handle the csv data source query response function handleCsvDsResponse(response) { if (response.isError()) { alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } var data = response.getDataTable(); var chart = new google.visualization.AnnotatedTimeLine(document.getElementById('csv_div')); chart.draw(data, {displayAnnotations: true}); }
CSV Data Source
An organization chart. The data is taken from the csv data source.