我正在使用 FusionCharts 3.2.1,并且我想在浏览器中未安装 Flash 播放器或禁用时在 javascript 中呈现图表。我正在调用方法 FusionCharts._fallbackJSChartWhenNoFlash() 但没有任何反应。
function updateChart(chartDataJSON) {
FusionCharts._fallbackJSChartWhenNoFlash();
var currentSwfName = 'MSCombi2D.swf';
if (chartDataJSON.swfName) {
currentSwfName = chartDataJSON.swfName;
}
if (prevSwfName != currentSwfName) {
prevSwfName = currentSwfName;
var contextPath = document.getElementById('contextPath').value;
var swfUrl = contextPath + '/charts/' + currentSwfName;
if (FusionCharts('residenceChart')) {
FusionCharts('residenceChart').dispose();
}
new FusionCharts({
id: 'residenceChart',
swfUrl:swfUrl,
renderAt:'consumptionChartDiv',
dataFormat:'json',
dataSource: chartDataJSON,
registerWithJS: 1,
width: 730,
height: 300,
debugMode: 0
}).render();
} else {
FusionCharts('residenceChart').setJSONData(chartDataJSON);
}
}