Click here to Skip to main content
15,882,209 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Expert,
I am Uday Satardekar,
I am using fusion chart for graph representation in my project.

And i am showing graph agaist category.
and my category contains some special characters like &,' etc.
Because of this it not generating proper xml.

For special characters i have use SecurityElement.Escape.

eg

XML
for (int i = 0; i < dtReport.Rows.Count; i++)
            {
                strXML += "<set name='" + SecurityElement.Escape(dtReport.Rows[i]["fieldName"].ToString()) + "' value='" +SecurityElement.Escape(dtReport.Rows[i]["Totalcount"].ToString()) + "' />";

            }



now strXML generate proper xml including special characters.I check this using breakpoints.

But still its not generating graph.
I thing i have to replace special characters from javascript(FusionChart.js) also.


Please help me to modify this javascipt.

Thanks in advance.
Posted
Updated 20-Feb-12 19:00pm
v2

1 solution

I solved this problem.

I put escape keyword in FusionChart.js file.

Please find function getSWFHTML: function()

and edit like following

C#
swfNode += ' id="'+ escape( this.getAttribute('id')) +'" name="'+ escape( this.getAttribute('id')) +'" ';



Above code working for me.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900