开发者

fusionchart addEventListener not working

I am using fusionchart and I wasn't able to use the addEventListener function. It's throwing me JavaScript error. In this JavaScript file the chart is loading and working fine if I remove the addEventListener function..

I开发者_如何转开发 have downloaded another fusioncharts_latestdownload.js file from the site. The addEventListener function is working in this new file but the chart is not getting loaded Please help me out to solve this issue.


FusionCharts allows you to set event listeners in charts (swf/js) built since v3.2. So, please check if you are using charts having version 3.2 or above.

Moreover, please also check if you have FusionCharts.js which is of v3.2 or above.

More pointers on adding event listeners:

  1. Make sure to use the appropriate variable name/js reference of the chart.

    var myChart = new FusionCharts(...);
    myChart.addEventListener ("DrawComplete" , myChartListener );

Basic Documentation : http://www.fusioncharts.com/docs/?JavaScript/JS_EventOverview.html#advanced

API Reference : http://www.fusioncharts.com/docs/?JavaScript/API/Events.html

  1. You can also use other chart reference models like:

    FusionCharts("myChartId").addEventListener("DrawComplete" , myChartListener); getChartFromId( DOMId ).addEventListener("DrawComplete" , myChartListener); FusionCharts.items["myChartId"].addEventListener("DrawComplete" , myChartListener);

You can also check out samples from :

http://www.fusioncharts.com/code/JavaScript/Basics/ListeningToEvents/Using_JavaScript_advanced_event_registration_model.html

Menu containing other examples of FusionCharts JavaScript API : http://www.fusioncharts.com/code/JavaScript/index.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜