2 messages in com.googlegroups.google-visualization-api[visualization-api] Re: hoe to trasfo...
FromSent OnAttachments
redrose14 Jul 2008 00:00 
Google VizGuy14 Jul 2008 00:06 
Subject:[visualization-api] Re: hoe to trasfor a resultset got in asp into a data table
From:Google VizGuy (viz@google.com)
Date:07/14/2008 12:06:36 AM
List:com.googlegroups.google-visualization-api

When you generate your html page, have this in top head <script type= "text/javascript" src="http://www.google.com/jsapi"></script>

Then, generate the DataTable, and draw the chart:

<script type="text/javascript"> function drawChart() { var data = new google.visualization.DataTable(); data.addColumn('string', 'Name'); data.addColumn('number', 'Sales'); data.addRows(3); data.setValue(0, 0, 'James'); data.setValue(0, 1, 1000); data.setValue(1, 0, 'Hari'); data.setValue(1, 1, 2000); data.setValue(1, 2, 460); data.setValue(2, 0, 'Sean'); data.setValue(2, 1, 3000);

var chart = new google.visualization.ColumnChart(document.getElementById('chart_div')); chart.draw(data, {width: 400, height: 240, is3D: true, title: 'Monthly Sales'}); } </script>

On Mon, Jul 14, 2008 at 10:00 AM, redrose <redr@gmail.com> wrote:

Hello

I have connected to the sqlserver database on my qwwebpage and queried the table. It returns me a resultset which gets displayed onto the webpage.

Can anyone help me as to how i transform my resultset into a datatable. Plz can u give me a link or how i go about doing this

suppose my resultset read the following Monthly Sales James 1000 Hari 2000 Sean 3000

How do i create a datatable so that i can use the visualization api to plot charts/graphs