rishi Report post Posted October 19, 2010 Hi Guys, I am using fusion pie chart with Extjs XTemplate. The problem is when the data ( label or value) contain & (ampersand) I get invalid xml data error. I tried to escape & by & but still facing the same issue. Below is the HTML code generated if you'll see one of label have value Third& we have encode it to Third& .both Third& and Third& give invalid xml data error. <embed src="../../CommonUI/dashboard/charts/Pie3D.swf" wmode="Transparent" scale="" value="exactfit" flashvars="&dataXML=<chart palette="4" decimals="3" animation="1" enableSmartLabels="1" enableRotation="1" bgColor="dbdee7,FFFFFF" showBorder="0" startingAngle="70"><set label="NA" value="57" isSliced="1" /><set label="Third&" value="6" isSliced="1" /><set label="Fourth" value="4" isSliced="1" /></chart>" quality="high" width="342" height="171" name="flashchartext-comp-1165-MIN" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> Please help me. Regards Rishi Saraf Share this post Link to post Share on other sites
Sanjukta Report post Posted October 19, 2010 Hi Rishi, Welcome to FusionCharts Forum! Could you please replace "&" with "%26"? Hope this helps. Share this post Link to post Share on other sites
rishi Report post Posted October 19, 2010 Thanks a lot Sanjukta it worked . Out of curiosity I have one more question. Like & do we have more characters which are handled this way. Regards Rishi Saraf Hi Rishi, Welcome to FusionCharts Forum! Could you please replace "&" with "%26"? Hope this helps. Share this post Link to post Share on other sites
rishi Report post Posted October 19, 2010 Hi Sanjukta, I found more problem that when we have both < and > character in word we again get issue even if we encode them with > , < however when we have any one of them i.e < or > they are displayed properly. Like in below code underlined text giving the issue. <embed src="../../CommonUI/dashboard/charts/Pie3D.swf" wmode="Transparent" scale="" value="exactfit" flashvars="&dataXML=<chart palette="4" decimals="3" animation="1" enableSmartLabels="1" enableRotation="1" bgColor="dbdee7,FFFFFF" showBorder="0" startingAngle="70"><set label="NA" value="57" isSliced="1" /><set label="Third%26<>" value="6" isSliced="1" /><set label="Fourth" value="4" isSliced="1" /></chart>" quality="high" width="342" height="171" name="flashchartext-comp-1165-MIN" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> Thanks a lot Sanjukta it worked . Out of curiosity I have one more question. Like & do we have more characters which are handled this way. Regards Rishi Saraf Share this post Link to post Share on other sites
Sanjukta Report post Posted October 19, 2010 Hi Rishi, You are always welcome. Please refer to the following links to know further details on the usage of Multi-lingual/Special characters in FusionCharts. http://www.fusioncharts.com/docs/?SpChar.html http://www.fusioncharts.com/docs/?SpCharAll.html http://www.fusioncharts.com/docs/?SpPunctuation.html Also, the characters like "&", "<", ">", etc are invalid characters while mentioned in XML. In order to parse it perfectly we need to pass it in encoded format. The variables which are invalid in XML needs to be encoded. Please check with the following link for your future reference. (As a suggestion ) http://www.w3schools.com/tags/ref_urlencode.asp Hope this helps. Share this post Link to post Share on other sites
rishi Report post Posted October 19, 2010 Hi Sanjukta, Thanks for links. I know that & , < , > make the xml invalid that's why i tried to encode them by normal XML encoding code i.e & , < and > . I didn't knew that for fusion chart uses URL encoding. Anyway Thanks again . Regards Rishi Hi Rishi, You are always welcome. Please refer to the following links to know further details on the usage of Multi-lingual/Special characters in FusionCharts. http://www.fusioncha...cs/?SpChar.html http://www.fusioncha...?SpCharAll.html http://www.fusioncha...unctuation.html Also, the characters like "&", "<", ">", etc are invalid characters while mentioned in XML. In order to parse it perfectly we need to pass it in encoded format. The variables which are invalid in XML needs to be encoded. Please check with the following link for your future reference. (As a suggestion ) http://www.w3schools...f_urlencode.asp Hope this helps. Share this post Link to post Share on other sites
Sanjukta Report post Posted October 19, 2010 Hi Rishi, You are always welcome. Glad that your issue is resolved. Happy FusionCharting! Share this post Link to post Share on other sites