I’m using FusionCharts 3.2.1 and I want to render charts in javascript when the flash player is not installed of disabled in browser. I’m calling the method FusionCharts._fallbackJSChartWhenNoFlash() but nothing happen.
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);
}
}
Is it mandatory that you stick to FusionCharts 3.2.1? If you upgrade to the latest version (which is free if you are already a customer), this issue will be solved.
Since FusionCharts 3.2.2, the component automatically renders JavaScript charts when Flash Player is not available and you would not need to explicitly call
FusionCharts._fallbackJSChartWhenNoFlash();In fact, this method is removed from the latest API.However, if you still wish to stick to v3.2.1, I would recommend you first look into the following:
FusionCharts.js