如何在highcharts中访问plotBands的特定属性?

时间:2016-08-06 07:20:36

标签: jquery highcharts

    var pB=[];  //later I have assigned **plotBands: pB,**
    pB[i]={
        from:tA[i],
        to: tA[i+1],
        label: { 
        text: wA[i], // Content of the label. 
        align: 'center'},
        color: '#eef',
        events: {
            click: function(){

                console.log("from: "+this.from);

                console.log("duration: "+this.(to-from));
            }
       }
    }

我想在每个pB [i]中访问上例中的 from 值。我怎么做 ? 来自有一个数值。enter code here console.log(“from:”+ this.from); 输出“undefined”。

0 个答案:

没有答案