highcharts圖表的上鑽下鑽,下鑽數據,與回取數據


通常圖表在下鑽之后,會點返回,返回之后,可能需要調用上鑽回調事件,在drillup事件里獲取上鑽數據,然后對需要聯動進行操作:

chart: {
          type: 'column',
          events: {
          drillup: function (e) { 
          var id = e.seriesOptions.id;
          xxxx= id;
          search();
} 
}
},

 

接下來是介紹常見操作,highcharts的下鑽,在events里進行操作:

plotOptions: {
    events: {
                click: function (e) {
                             xxxxx = e.point.id;
                             search();
                            }
                 }
              }
},

 

上下鑽中,返回按鈕文字描述,全局lang:

lang: {
     drillUpText: '返回上一級'
}

 

上下鑽中,返回按鈕默認位置可能會檔住圖標,設置drilldown的參數,移動位置方法:

plotOptions: {
  drilldown: {
    drillUpButton: {
    position: {
    y: -38,
    x: -40
  }
},

 

上下鑽中,調整theme的參數,設置返回按鈕文字的高度:

plotOptions: {
  theme: {
    height: 12,
  }

}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM