我使用的是FusionCharts 3.2.1,並且我想在Flash Player未安裝在瀏覽器中禁用時使用JavaScript呈現圖表。我打電話給方法FusionCharts._fallfallJSChartWhenNoFlash()但沒有發生。FusionCharts 3.2.1 - 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);
}
}
圖表是否在Flash中呈現? – 2012-04-06 06:15:13
@HrishikeshChoudhari是的。 – spauny 2012-04-06 06:17:33