Got it guys!!!
On Mon, Jun 7, 2010 at 11:06 AM, Akku <[email protected]> wrote:
> this is the output from the servlet
>
> google.visualization.Query.setResponse({version:'0.6',status:'ok',sig:'890182716',table:
> {cols:[{id:'X',label:'X',type:'date',pattern:''},
> {id:'Y',label:'Y',type:'string',pattern:''}],
> rows:[{c:[{v:new Date(2008,11,12)},{v:'439'}]},
> {c:[{v:new Date(2008,10,12)},{v:'329'}]},
> {c:[{v:new Date(2008,9,12)},{v:'254'}]},
> {c:[{v:new Date(2008,8,12)},{v:'237'}]},
> {c:[{v:new Date(2008,7,12)},{v:'171'}]},
> {c:[{v:new Date(2008,6,12)},{v:'197'}]},
> {c:[{v:new Date(2008,5,12)},{v:'157'}]}]}})
>
> The rows are getting the parameters perfectly but I cannot create
> annoted timeline from this
> Here is the js-ajax code , the code worked for other chart.
> <html>
> <head>
> <title>All Examples</title>
> <!--Load the AJAX API-->
> <script type="text/javascript" src="http://www.google.com/jsapi"></
> script>
> <script type="text/javascript">
>
> // 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('CsvDataSourceServlet?
> url=http://localhost:8084/WebApplication1/hope.csv'<http://localhost:8084/WebApplication1/hope.csv%27>
> );
> 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, {width: 600, height: 150, is3D: true});
> }
> </script>
> </head>
> <body>
>
> <h1> CSV Data Source </h1>
>
> An organization chart.
> The data is taken from the csv data source.
> <div id="csv_div"></div>
>
>
> </body>
> </html>
>
>
>
>
--
regards,
Akshay .Y. Dange.
MS in Computer Science
State University of New York, Binghamton
USA
--
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.