Hey guys I actually figured it out myself. I was looking around at
other programs and this is how they did it, it also worked for me.
For example: I have a java bean pointing to a file within my program.
Let's call it "report".
<jsp:useBean id="report" scope="request" type="file.OtherFile"/>
Then, within the function, I would set something up like this.
google.load('visualization', '1', {packages:['table']});
google.setOnLoadCallback(drawTableExample);
function drawExample()
{
var data = new google.visualization.DataTable();
var stat1 = 0;
var stat2 = 0;
stat1 = <%= report.getData1()%>;
stat2 = <%= report.getData2()%>;
data.addColumn('string', 'Work Orders');
data.addColumn('number', 'Totals');
data.addRows(4);
data.setCell(0, 0, 'Statistic One');
data.setCell(0, 1, stat1);
data.setCell(1, 0, 'Statistic Two');
data.setCell(1, 1, stat2);
var table = new google.visualization.Table
(document.getElementById('table_div1'));
table.draw(data, {showRowNumber: true});
}
This is tested and working like a charm for me. If anyone needs help
in using this in a program, let me know. :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---