echarts给graphic中心点添加点击事件

  initChart () {
    
    
      this.$nextTick(() => {
        const chart = echarts.init(this.$refs.SmartCityPie as HTMLElement)
        chart.setOption(this.getOptions())
        // 图表点击事件
        chart.on('click', params => {
    
    
          if (params.componentType === 'graphic') {
    
    
            // 打开对话框
            this.drawer = true
          }
        })
      })
    },

猜你喜欢

转载自blog.csdn.net/anny_mei/article/details/117811163
今日推荐