I have webApp ready and I want to add the Google Chart API i.e. Pie
Chart. in the html that is generated through a JSP.
But when I embed the code in the JSP of the Google Chart.
I get the Object Expected Message instead of the PIE CHART.
---------------------------------------------------------------------------------------------
<%@ include file="/common/taglibs.jsp"%>
<head>
<title><fmt:message key="suiteResultDetail.title"/></title>
<meta name="heading" content="<fmt:message
key='suiteResultDetail.heading'/>"/>#
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/
jsapi"></script>
<script type="text/javascript">
// Load the Visualization API and the piechart package.
google.load('visualization', '1.0', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is
loaded.
google.setOnLoadCallback(drawChart);
// Callback that creates and populates a data table,
// instantiates the pie chart, passes in the data and
// draws it.
function drawChart() {
// Create the data table.
var data = new google.visualization.DataTable();
data.addColumn('string', 'Topping');
data.addColumn('number', 'Slices');
data.addRows([
['Mushrooms', 3],
['Onions', 1],
['Olives', 1],
['Zucchini', 1],
['Pepperoni', 2]
]);
// Set chart options
var options = {'title':'How Much Pizza I Ate Last Night',
'width':400,
'height':300};
// Instantiate and draw our chart, passing in some options.
var chart = new
google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<b>Suite Id =</b> ${suiteStats.suiteId}<br/>
<b>Time of Start =</b> ${suiteStats.timeStamp}<br/>
<b>Total =</b> ${suiteStats.totalTests}<br/>
<b>Pass =</b> ${suiteStats.passTests}<br/>
<b>Fail =</b> ${suiteStats.failTests}<br/>
<b>TBE =</b> ${suiteStats.toBeExecuted}<br/>
<display:table name="suiteResultList" class="table" requestURI=""
id="suiteResultList" export="true" pagesize="25">
<display:column property="testId" media="csv excel xml pdf"
titleKey="test.id" />
<display:column property="testName" sortable="true"
titleKey="test.name" />
<display:column property="engineName" sortable="true"
titleKey="result.engineName" />
<display:column property="moduleName" sortable="true"
titleKey="test.moduleName" />
<display:column property="status" sortable="true"
titleKey="engine.result.status" />
<display:column property="condition" sortable="true"
titleKey="test.condition"/>
<display:column property="outputResult" sortable="true"
titleKey="suiteResultDetail.outputResult" style="white-space: pre;" />
<display:setProperty name="paging.banner.item_name" value="result"/
>
<display:setProperty name="paging.banner.items_name"
value="results"/>
<display:setProperty name="export.excel.filename" value="Suite
List.xls"/>
<display:setProperty name="export.csv.filename" value="Suite
List.csv"/>
<display:setProperty name="export.pdf.filename" value="Suite
List.pdf"/>
</display:table>
<body>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
</body>
--
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.