mthai Report post Posted April 22, 2009 (edited) Hi Can we use fusion chart with XML data hard-coded ? I used it in a portlet seam + jsf + facelets + richfaces environment. I have following code in index.xhtml attachments And i have the following result source code HTML attachments The "dataURL" is null ... I removed all indentation and formatting But doesn't work By syllepsa > @mathai I noticed that you didn't include java script code. Yes, you're right, but i used a template and i included java script code in template.xhtml index.txt result_html.txt template.txt Edited May 11, 2009 by Guest Share this post Link to post Share on other sites
FusionCharts Support Report post Posted April 23, 2009 (edited) Hi, From your source i find a place having: <param name="quality" value="high" /> <graph caption= This should be: <param name="quality" value="high" /> <param name="flashvars" value="dataXML=<graph caption=.....&chartWidth=...&chartHeight=...&DOMId=..." > The same FlashVars definitions also goes to the <embed> element attribute too: flashVars="dataXML=<graph caption=.....&chartWidth=...&chartHeight=...&DOMId=..." Edited April 23, 2009 by Guest Share this post Link to post Share on other sites
srividya_sharma Report post Posted April 23, 2009 Yes Sudipto, that is the problem... but that code is generated dynamically. ( It is the resultant html ) So there must be some mistake in the input renderHTML tag. Share this post Link to post Share on other sites
mthai Report post Posted April 27, 2009 Hi, In the example : Simple Column 3D Chart with XML data hard-coded in jsp page (dataXML method) The code source HTML is : < object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="700" height="300" name="BasicChart" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> < param name="allowScriptAccess" value="always" /> < param name="movie" value="FusionCharts/FCF_Column3D.swf" /> < param name="quality" value="high" /> < graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'> < set name='Jan' value='462' color='AFD8F8' /> < set name='Feb' value='857' color='F6BD0F' /> [...] < set name='Dec' value='950' color='A186BE' /> < /graph> < param name="FlashVars" value="&chartWidth=700&chartHeight=300&dataXML=<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'><set name='Jan' value='462' color='AFD8F8' /><set name='Feb' value='857' color='F6BD0F' /><set name='Nov' value='761' color='9D080D' /><set name='Dec' value='950' color='A186BE' /></graph>" /> < embed src="FusionCharts/FCF_Column3D.swf" FlashVars="&chartWidth=700&chartHeight=300&dataXML=<graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'><set name='Jan' value='462' color='AFD8F8' /><set name='Feb' value='857' color='F6BD0F' /><set name='Nov' value='761' color='9D080D' /><set name='Dec' value='950' color='A186BE' /></graph>" src="FusionCharts/FCF_Column3D.swf" quality="high" width="700" height="300" name="BasicChart" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> < /embed> < /object> So the code source HTML like my code source HTML right? =/ But my code doesn't find the code xml... I try to replace my dynamics repeat code a4j with a hard-coded xml, I have the following code : < rich:panel header="Fusion Chart"> < fc:renderHTML chartId="SimpleChart" filename="../FusionCharts/FCF_Column3D.swf" width="700" height="300"> < graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'> < set name='Jan' value='462' color='AFD8F8' /> < set name='Feb' value='857' color='F6BD0F' /> < /graph> < /fc:renderHTML> < /rich:panel> And the code source HTML doesn't change =/ Please check my input renderHTML tag, if I make some mistakes Share this post Link to post Share on other sites
FusionCharts Support Report post Posted April 27, 2009 Hi, Your code that passes < fc:renderHTML must be having the issue. Share this post Link to post Share on other sites
mthai Report post Posted April 27, 2009 So... what should I do? =/ Because, i try to debug the code and, doesn't find the bodyContent :s Share this post Link to post Share on other sites
srividya_sharma Report post Posted April 27, 2009 The following code works for me. ( slightly modified your code. ) Please test whether this works for you. <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://www.fusioncharts.com" prefix="fc" %> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <f:view> <html> <head> <title>Show Custom Component</title> <!-- YOU HAVE TO INCLUDE THIS --> <script type="text/javascript" src="FusionCharts/FusionCharts.js"> </script> </head> <body> <rich:panel header="Fusion Chart"> <fc:renderHTML chartId="SimpleChart" filename="../FusionCharts/FCF_Column3D.swf" width="700" height="300"><graph caption='Monthly Unit Sales' xAxisName='Month' yAxisName='Units' decimalPrecision='0' formatNumberScale='0'><set name='Jan' value='462' color='AFD8F8' /> <set name='Feb' value='857' color='F6BD0F' /> </graph> </fc:renderHTML> </rich:panel> </body> </html> </f:view> Please try this code. Just wanted to confirm that You are using Free version of FusionCharts. < graph > tag can be used only in the free version. The pro version uses < chart > tag. You are using JSF 1.2 and you are using the latest FusionCharts jar from the post: http://www.fusioncharts.com/forum/FindPost13230.aspx Share this post Link to post Share on other sites