function drawTable() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Name');
data.addColumn('number', 'Salary');
data.addColumn('boolean', 'Full Time Employee');
data.addRows(4);
data.setCell(0, 0, 'Mike');
data.setCell(0, 1, 10000, '$10,000');
data.setCell(0, 2, true);
data.setCell(1, 0, 'Jim');
data.setCell(1, 1, 8000, '$800');
data.setCell(1, 2, false);
data.setCell(2, 0, 'Alice');
data.setCell(2, 1, 12500, '$12,500');
data.setCell(2, 2, true);
data.setCell(3, 0, 'Bob');
data.setCell(3, 1, 7000, '$7,000');
data.setCell(3, 2, true);
var table = new google.visualization.Table(document.getElementById(
'table_div'));
table.draw(data, {showRowNumber: true});
}
This is how you can do it.
Check the source code given here.
http://code.google.com/apis/visualization/documentation/gallery/table.html
/Kannaiyan
On Wed, Oct 22, 2008 at 11:32 AM, arkgroup <[EMAIL PROTECTED]> wrote:
>
> My goal is to read data from SQL and convert into DataTable.
> I can read data and render into html table.
> How can I convert html table with rows and columns that have data into
> google.visualization.DataTable?
>
> Thanks.
>
> >
>
--
The ones who are hardest to love are usually the ones who need it the most.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---