This article mainly introduces how to solve the Chinese garbled problem of FusionCharts Association. For more information, see.
Question:
When using fusioncharts, you may also want to click a part of the Chart on the demo.html page, and then display the details of this part.
Fusioncharts has setDataXML, and setDataURL are used to set data. However, there may be garbled characters (which may occur in AJAX). you should understand the specific usage of shoes.
Details are not described in detail.
Solution.
If the returned content of your Ajax request is garbled, you can directly use Jquery. ajax.
The Code is as follows:
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); // you can directly set the content of myid with data here.
}
});
}
Without garbled characters ..