0

我正在尝试使用这样的点击事件访问我的 highchart 堆积条形图中列的值:

plotOptions: {
      series: {
        stacking: 'normal',
        cursor: 'pointer',
        point: {
          events: {
            click:function(event){
              console.log(event);
              //this.filter.emit([this.category, this.serie.name]);
              alert('Name: '+ this.category + ', Value: ' + this.y + ', Series :' + this.series.name);
            }
          }
        }
      }
    },

到目前为止一切都很好,但我需要在我的组件中使用这些值。问题是 'this' 关键字指的是 Point 对象,如果不能用 'this.' 引用它们,我看不出如何使用组件的参数。

有没有办法在点击触发的函数中同时访问范围(我的组件和 Point 对象)?

4

0 回答 0