HighCharts脚本中的“not a function”错误

时间:2016-01-03 22:28:38

标签: javascript highcharts

考虑HighCharts对象here,它是previous问题的解决方案,其plotOptions详细信息为:

    plotOptions: {
        scatter: {
            lineWidth:1,
            marker: {
                radius: 1,
                symbol:'circle',
                fillColor: '#800000',
                states: {
                    hover: {
                        enabled: true,
                        radius:0,
                        radiusPlus:2,
                        lineColor: '#ff0000',
                        fillColor: '#ff0000'
                    }
                }
            },
            events: {
                mouseOver: function () {

                    this.chart.series[this.index].update({
                        color: 'red'
                    });
                },
                mouseOut: function () {

                    this.chart.series[this.index].update({
                        color: "#b0b0b0"
                    });                           
                }
            }
        }
    },

当我将代码复制并粘贴到html文件中时(但即使是在jfiddle中)并在Firefox中运行它并激活FireBug,将鼠标悬停在系列上并在控制台中显示错误:TypeError: f.onMouseOut is not a function。如何消除这种错误?

0 个答案:

没有答案