JS:updateChart, single-quote/apostrophe
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



JS:updateChart, single-quote/apostrophe Expand / Collapse
Author
Message
Posted 1/4/2008 11:07:20 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/4/2008 4:41:37 PM
Posts: 2, Visits: 13
using the example application (FusionsCharts and Javascript), I added

var1.replace(/\'/g, "%26apos;");

to getProductXML() and used var1 in seriesName of the dataset tag so it does include single-quotes.

On the initial display the legend of the chart appears correctly, e.g., "Bob's Bistro"; however, when I click a form item and trigger updateChart(), the new chart displays "Bob%26apos;s Bistro".

Any ideas?


singlespeeder
Post #3609
Posted 1/4/2008 4:56:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 1/4/2008 4:41:37 PM
Posts: 2, Visits: 13
I don't know if this is the best solution, but it works in FF and IE.

In FusionCharts.js I modified the infosoftglobal.FusionChartsUtil.updateChartXML function from this:

chartObj.SetVariable("_root.newData",strXML);


to this:

chartObj.SetVariable("_root.newData",strXML.replace(/%26/g, "&"));


Seems to work.

I also modified the getProductXML function slightly to account for other special characters:

thisCat = categories[c].replace(/\'/g, "%26apos;");
thisCat = thisCat.replace(/\&/g, "%26");
thisCat = thisCat.replace(/\"/g, "%26quot;");
thisCat = thisCat.replace(/\[LT SYMBOL]/g, "%26lt;");
thisCat = thisCat.replace(/\>/g, "%26gt;");


Where [LT symbol] is the "less than" symbol. Like I said, seems to work, but don't know if that's the best solution. If anyone else has ideas, please let me know. Thanks.


singlespeeder
Post #3611
Posted 9/10/2008 5:30:12 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 11/18/2008 4:27:03 AM
Posts: 5, Visits: 62
I am getting the problem when i drill down a chart
& unable to drilldown the updated chart

your below change solves my problem

chartObj.SetVariable("_root.newData",strXML.replace(/%26/g, "&"));


Good Work

Thank you so much yavorosky

i am breaking my head for 2 days
Post #8422
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 6:52pm


Execution: 0.047.