" pointAttr" Highcharts库5.0.0中缺少属性

时间:2016-10-17 13:23:21

标签: javascript svg highcharts highstock

小提琴http://jsfiddle.net/n3e49ws2/1/使用highcharts库v4.2.7。在这个小提琴中,在选择任何数据点时,观察到" pointAttr"属性存在于"这个"用于选择事件处理程序。

point: {
    events: {
        select: function() {
          if (this.pointAttr)
            alert("pointAttr exists.");
          else
            alert("pointAttr does not exist.");
        }
    }
}

另一方面,小提琴http://jsfiddle.net/n3e49ws2/使用最新的highcharts库5.0.0。在这,我无法得到" pointAttr"属于"这个"用于select事件处理程序。为什么要做出这种改变?是否有#34; pointAttr"属性,因为我想直接更改SVG点。

1 个答案:

答案 0 :(得分:5)

要获取pointAttr,请使用this.series.pointAttribs(this, state);,其中state可以是"""hover""select"之一。