I am trying to load a very simple column chart in JSF2.0 with PrimeFaces 3.2. I have written following code:
File Name: login.xhtml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>AMAP4.0 POC in PrimeFaces</title>
<script language="javascript" src="FusionCharts.js"></script>
<script language="javascript" >
FusionCharts.setCurrentRenderer('javascript');
function showChart()
{
alert("this");
var myChart = new FusionCharts("Charts/Column2D.swf", "chart1Id", "400", "300", "0", "0");
myChart.setJSONData ('{ "chart": { "caption" : "Weekly Sales Summary" , ' + '"xAxisName" : "Week", "yAxisName" : "Sales", "numberPrefix" : "{:content:}quot; }, ' + '"data" : [ { "label" : "Week 1", "value" : "14400" }, ' + '{ "label" : "Week 2", "value" : "19600" }, ' + '{ "label" : "Week 3", "value" : "24000" }, ' + '{ "label" : "Week 4", "value" : "15700" } ] }');
myChart.render("chart1div");
}
</script>
</h:head>
<h:body>
<h:outputText value="Login Page"/>
<h:form><h:commandButton value="Show MD Screen" action="/resources/md/mdScreen"></h:commandButton></h:form>
<h:commandButton value="Display Chart" onclick="showChart();"/>
<div id="chart1div">
FusionCharts
</div>
</h:body>
</html>Now when I click on "Display Chart" button, I am only getting message like "Loading Chart, Please Wait." but the chart is not being loaded even after 5-10 minute. What may be the possible reason for this and is there any way out of this problem.I have tested it on both IE 8 and Firefox.
Edited by jksnu, 25 April 2012 - 05:07 AM.










