2017-03-13 5 views
0

私はID番号がseries1series2flagsの3つのシリーズがあります。最初にflagsonSeriesプロパティはseries1に設定されています。凡例をクリックしてseries1を非表示にすると、そのlegendItemClickイベントでonSeriesのプロパティがflagsに動的に設定されるというのは、series2になりますか?私はそうする方法を見つけることができないようです。ありがとう!動的にonSeriesプロパティを変更します。

答えて

1

Series.update()でフラグシリーズを更新し、onSeriesプロパティを変更する必要があります。

legendItemClick: function (e) { 
     e.preventDefault(); // prevent toggle visibility 
     this.chart.get('flags-series').update({ // get the flag series and update it 
     onSeries: this.options.id 
     }); 
    } 

例:http://jsfiddle.net/pfx77nn4/

関連する問題