echarts 添加自定義toolbox

在echarts中能夠本身添加toolbox,而後添加相應的click事件echarts

toolbox: {
  show: true,
  orient: 'vertical',
  feature: {
    myFlow: {
      show: true,
      title: '點擊',
      icon: 'image://assets/icon/test.png',
      onclick: function (params) {
        console.log(params);
        alert('1');
      }
    }
  }
}

在起名的時候,須要以my開頭便可事件

相關文章
相關標籤/搜索