whitemedia Report post Posted September 6, 2011 (edited) How can i get this code to work $enkatname = 'Some text & some text' $strXML = "<graph caption='".$enkatname."'....... I get invalid XML Data Edited September 6, 2011 by whitemedia Share this post Link to post Share on other sites
Guest Angshu Report post Posted September 7, 2011 Hi, Welcome to FusionCharts Forum! You can directly embed most of the special characters and punctuation marks in the XML/JSON data source of your chart. However, &, <, >, ' (apostrophe) and "(quote) need to be specially encoded when providing the same as a part of the chart data. Apart from this, there is no need to encode any other special character. For more details, please refer to the link:http://www.fusioncha...unctuation.html Hope this helps. Share this post Link to post Share on other sites
whitemedia Report post Posted September 7, 2011 Hi, Welcome to FusionCharts Forum! You can directly embed most of the special characters and punctuation marks in the XML/JSON data source of your chart. However, &, <, >, ' (apostrophe) and "(quote) need to be specially encoded when providing the same as a part of the chart data. Apart from this, there is no need to encode any other special character. For more details, please refer to the link:http://www.fusioncha...unctuation.html Hope this helps. Thanx for reply but it still doesnt work. Must have something to do with how i print it with PHP. $strXML = "<graph caption='".$enkatname."'....... Share this post Link to post Share on other sites
Guest Angshu Report post Posted September 7, 2011 Hi, Could you please send us the entire code to look into the issue? Awaiting for your response. Share this post Link to post Share on other sites
whitemedia Report post Posted September 7, 2011 Hi, Could you please send us the entire code to look into the issue? Awaiting for your response. $enkatname is stored in a Mysql $strXML = "<graph caption='".$enkatname."' subcaption='".$start." - ".$end."' yAxisMaxValue='6' yAxisName=' ' numberPrefix='' showNames='1' showValues='1' rotateNames='0' labelDisplay='WRAP' useEllipsesWhenOverflow='1' showColumnShadow='1' animation='1' showAlternateHGridColor='1' AlternateHGridColor='ff5904' divLineColor='ff5904' divLineAlpha='20' alternateHGridAlpha='5' canvasBorderColor='ffffff' baseFontColor='222222' lineThickness='3' limitsDecimalPrecision='0' divLineDecimalPrecision='0' decimalPrecision='2' bgColor='ffffff' exportEnabled='1' exportAtClient='0' exportHandler='FusionCharts/FCExporter.php' > "; if ($f1 == ''){}else{$result = mysql_query("SELECT f1 FROM enkatsvar WHERE enkatid = $enkatid AND f1 != 0 AND date > '$start' AND date < '$endny'"); $num_rows = mysql_num_rows($result); $res = mysql_query("SELECT sum( f1 ) as f1 FROM enkatsvar WHERE enkatid = $enkatid AND date > '$start' AND date < '$endny'"); $data = mysql_fetch_assoc( $res ); $total = $data['f1']; @(@($total2 = $total / $num_rows)); $strXML .= "<set name='$f1' value='$total2' />";} $strXML .="</graph>"; echo '<table border="0"> <tr><td>'; //Create the chart - Column 3D Chart with data from Data/Data.xml echo renderChartHTML("./FusionCharts/Column3D.swf", "", $strXML, "", 860, 420, false, true); echo'</td><td valign="middle"><a title="" href="templates/viewenkat_fullscreen.php?enkatid='.$enkatid.'&start='.$start.'&end='.$end.'" rel="lyteframe" data-lyte-options="width:100% height:450 scrolling:no"><img src="./images/icons/full_screen.png" width="35"></td> </tr> </table>'; Share this post Link to post Share on other sites
whitemedia Report post Posted September 8, 2011 No answer on this issue? Share this post Link to post Share on other sites