通常图表在下钻之后,会点返回,返回之后,可能需要调用上钻回调事件,在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,
  }

}

 

相关文章:

  • 2021-09-14
  • 2021-07-11
  • 2021-07-12
  • 2021-12-04
  • 2022-01-07
  • 2022-01-07
  • 2022-12-23
  • 2021-04-12
猜你喜欢
  • 2022-12-23
  • 2021-10-22
  • 2022-03-05
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2021-10-01
相关资源
相似解决方案