Hi,
Now I'm using FusionCharts lib for charting.
From the above code
graph1.jsp
<
jsp:directive.page import="util.FusionChartsCreator" />
<%
String chartXML = "<chart caption='Monthly Sales Summary' subcaption='For the year 2006' xAxisName='Month' yAxisName='Sales' " +
"numberPrefix='$'><set label='January' value='17400' /><set label='February' value='19800' /><set label='March' value='21800' />" +
"<set label='April' value='23800' /><set label='May' value='29600' /><set label='June' value='27600' />" +
"<set label='July' value='31800' /><set label='August' value='39700' /><set label='September' value='37800' />" +
"<set label='October' value='21900' /><set label='November' value='32900' /><set label='December' value='39800' /></chart>";
String graphCode = FusionChartsCreator.createChartHTML("FusionCharts/Column3D.swf", "", chartXML, "myChart", 600, 300, false);
%>
<%=graphCode%>
This is supposed to display the chart i want and it is displaying in an html page (when i tried with alternate js function). But while running the app, it is not displaying with jsf. The FusionCharts directory, graph1.jsp, WEB-INF and the main jsf page are in the same level in the directory structure.
I debugged with Firebug and the html code for the graph code found is
<span id="topTenForm:barGraph" style="width: 400px;">
<object id="myChart" height="300" width="600" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">
<param value="always" name="allowScriptAccess"/>
<param value="FusionCharts/Column3D.swf" name="movie"/>
<param value="chartWidth=600&chartHeight=300&debugMode=0&dataXML=<chart caption='Monthly Sales Summary' subcaption='For the year 2006' xAxisName='Month' yAxisName='Sales' numberPrefix='$'><set label='January' value='17400' /><set label='February' value='19800' /><set label='March' value='21800' /><set label='April' value='23800' /><set label='May' value='29600' /><set label='June' value='27600' /><set label='July' value='31800' /><set label='August' value='39700' /><set label='September' value='37800' /><set label='October' value='21900' /><set label='November' value='32900' /><set label='December' value='39800' /></chart>" name="FlashVars"/>
<param value="high" name="quality"/>
<embed height="300" width="600" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="always" name="myChart" quality="high" flashvars="chartWidth=600&chartHeight=300&debugMode=0&dataXML=<chart caption='Monthly Sales Summary' subcaption='For the year 2006' xAxisName='Month' yAxisName='Sales' numberPrefix='$'><set label='January' value='17400' /><set label='February' value='19800' /><set label='March' value='21800' /><set label='April' value='23800' /><set label='May' value='29600' /><set label='June' value='27600' /><set label='July' value='31800' /><set label='August' value='39700' /><set label='September' value='37800' /><set label='October' value='21900' /><set label='November' value='32900' /><set label='December' value='39800' /></chart>" src="FusionCharts/Column3D.swf"/>
</object>
</span>
And it showing a white box without any graph in it. How i can show this in the jsf page? Any specific tags available in jsf for this?
Thanks in advance
Rose