通常圖表在下鑽之后,會點返回,返回之后,可能需要調用上鑽回調事件,在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, } }