Quickly solve the problem of Chinese garbled code linked by FusionCharts

  • 2020-03-30 00:45:10
  • OfStack

Problem content:

When using fusioncharts, you may want to click on a section of the Chart on a page like demo.html and display the details of that section.

Fusioncharts has two methods, setDataXML and setDataURL, which are used to set the data. However, there will be some gargle problems (which may occur in the case of AJAX).

The details are not detailed.

Solution.

If the content of your Ajax request is garbled, use jquery.ajax directly.


function mychartclick(month) {
         var id =1;
         var d = new Date();
              var strURL='xxxx'           
              jQuery.ajax({
                        type: "Get",
                        url: strURL
                        data: strURL,
                        success: function (data) {
                               var chartObj = getChartFromId("myid");
                               chartObj.setDataXML(data);              //Just use data to set the content of myid.
                        }
                    });
     }  

Garbled code is gone..


Related articles: