So I call a CFC to get my ZingChart data, then I put that data in as the graph 
data attribute…              

var randomNum = Math.random();
// Call to CFC to get data
$.getJSON
   
("<cfoutput>#application.path.cfcScriptPath</cfoutput>cfcs/database/dashboard/dashboar.cfc?randomNum="
 + randomNum + "&_cf_nodebug=true",
   {method:'get_allLRrespByMonth',
    datasource: '<cfoutput>#session.datasource#</cfoutput>',
    cache: false
   },
     function(data){

        // Render chart from data passed from CFC
            zingchart.render({
               width: <cfoutput>#variables.chartWidth#</cfoutput>,
               height: <cfoutput>#variables.chartHeight#</cfoutput>,
               container: 'zingchart4',
               data: data
            }); 

   });     


The data I see when I click “View Source” on the ZingChart looks like:

{
"graphset":[
    "{\"show-progress\":false,\"graphset\":[
        {\"type\": 
\"mixed\",\"title\":{\"text\":\"LRResponseStatus-Last6mo\",\"background-color\":
 \"#578FD5\"},\"plot\":{\"tooltip-text\":\"%v\" + 
\"DRLsReviewed\"},\"scale-x\":{\"values\":[\"Mar-12\",\"Apr-12\",\"May-12\",\"Jun-12\",\"Jul-12\",\"Aug-12\",\"Sep-12\",\"Oct-12\",\"Nov-12\",\"Dec-12\",\"Jan-13\",\"Feb-13\",\"Mar-13\"]},\"legend\"
 : {\"margin-top\":40},\"series\":[
            {\"type\" : 
\"bar3d\",\"values\":[1,2,3,0,1,0,1,2,0,0,0,0,1],\"text\":\"LRResponses\"}]}]}"]
        }

If I so a JS alert out the “data” it does not have the \” ‘s  but has 
just the regular double quotes as it should.  The \”’s are getting put in 
somehow and I wasn’t sure if it was the ZingChart code or what.  Has anyone 
else experienced this?

Thanks

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354804
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to