在选择事件中,“point.select不是一个函数”,Highcharts

时间:2015-12-09 13:08:15

标签: javascript jquery highcharts

我在尝试覆盖散点图点选择的默认行为时遇到问题,以支持鼠标左键单击的多个选择。

我的plotOption是:

Thread.Sleep

如您所见,我在点击和选择事件时调用select(true,false),但我在选择的事件中有 plotOptions: { scatter: { point:{ events:{ click:function(e){ var point = this; console.log(point ,"click") point.select(true,true); //e.preventDefault(); }, select:function(e){ var point = this; console.log(point ,"select") point.select(true,true);//just want to select somehow, but got error here //e.preventDefault();// and then prevent the default behavior that will cause unselect of other points. }, unselect:function(){ var point = this; console.log(point ,"unselect"); } } }, marker: { radius: 3, states: { hover: { enabled: true, lineColor: 'rgb(100,100,100)' } } }, states: { hover: { marker: { enabled: false } } } }, series : { cursor:'pointer', allowPointSelect: true, marker:{ states:{ select:{ lineWidth:3, lineColor:'#2cbfbe', fillColor:'white', radius:6 } } } } },

enter image description here

0 个答案:

没有答案