canotto Report post Posted November 7, 2012 Good evening, I have a problem in display label in chart. I create a chart from a database and i ahve the space character like + and & character like %26. I try to put the bom in xml file but nothing. The call for the chart is: ... strXML = "<chart exportEnabled='1' bgColor='ffffff' showBorder='1' paletteColors='1c1c1c,5f5f5f,b2b2b2,333333,808080,dddddd' animation=' " & animateChart & "'>" ... 'Finally, close <chart> element strXML = strXML & "</chart>" 'Create the chart - Pie 3D Chart with data from strXML Call renderChart("../../FusionCharts/Pie3D.swf", "", strXML, "FactorySum", 988, 550, false, true) Attach, the image of chart, all + are space in db and all %26 are & in db too. Can you help me? Thanks Andrea chart.pdf Share this post Link to post Share on other sites
Guest Bindhu Report post Posted November 8, 2012 Hi, You will have to encode the characters. For '&', please use & and see if this helps. And for space, you will have to replace + character with space while the XML data is formed. Also, please share the complete XML data. Share this post Link to post Share on other sites
canotto Report post Posted November 13, 2012 Dear Bindhu, thank for your relay but the problem is hard for me. I try with Server.URLEncode and with the replace but didn't works. The complete code are: --Start code-- strXML = "<chart exportEnabled='1' bgColor='ffffff' showBorder='1' paletteColors='1c1c1c,5f5f5f,b2b2b2,333333,808080,dddddd' animation=' " & animateChart & "'>" strQuery = "select * from sov_all where ..." Set oRs = oConn.Execute(strQuery) While Not contatore = 40 svar = ors("nome_tbl_firm") strXML = strXML & "<set label='" & Server.URLEncode(sVar) & "' value='" & ors("conteggiodistudio") & "' link='n-" & Server.URLEncode("lowfirmprofile_adv.asp?studio=" & ors("studio") & "&periodo=" & periodo) & "'/>" end if 'Close recordset contatore = contatore + 1 oRs.MoveNext Wend strXML = strXML & "</chart>" Call renderChart("../../FusionCharts/Pie3D.swf", "", strXML, "FactorySum", 988, 550, false, true) -- end code -- Thanks for your patience Andrea Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted November 15, 2012 Hi, From the code, it seems the special characters like: <space> and '&' are coming from your database while generating the XML string in your server side script. In most cases the XML generator Server-side script file might be created with ANSI encoded format.So you need to add the BOM using script at the very beginning of the output stream. Moreover, when a Server-side script creates an XML file, it should add the BOM stamp as the very first three bytes of the file. So, could you please try once by putting the below code snippet at the very beginning of your ASP file? Ref. Code: Response.AddHeader "Content-Type", "text/xml;charset=UTF-8" Response.CodePage = 65001" Response.BinaryWrite( chrb(239) ) Response.BinaryWrite( chrb(187) ) Response.BinaryWrite( chrb(191) ) // Now write your XML data to output stream For more information on "Using Multi-lingual text in FusionCharts XT", please follow the link below: http://docs.fusioncharts.com/charts/contents/?advanced/special-chars/SpChar.html Hope this helps! Share this post Link to post Share on other sites
canotto Report post Posted November 20, 2012 Dear Bindhu, Thank you very mauch for your assistance. Andrea Share this post Link to post Share on other sites