How to use the dispose function from echarts

Find comprehensive JavaScript echarts.dispose code examples handpicked from public code repositorys.

148
149
150
151
152
153
154
155
156
157
item.legend_info.map((item1, index1) => {
  if (this.$refs[item1.id] && item1.options) {
    if (item1.type === 'timestamp' && isResize) {
      this.showTime(item1.id)// 时间戳组件
    } else {
      echarts.dispose(this.$refs[item1.id][0])
      let theme = ''
      if (this.page.theme.list && this.page.theme.list.length) {
        this.page.theme.list.map((item, index) => {
          if (item.id === this.page.params.theme) {
fork icon26
star icon44
watch icon6

+ 3 other calls in file

278
279
280
281
282
283
284
285
286
287
let layer = this.page.layer
let thisVessel = this.page.container_info[this.page.vesselI]
if (thisVessel.legend_info && thisVessel.legend_info.length) {
  let thisLayer = thisVessel.legend_info[this.page.layerI]
  if (layer && this.$refs[layer] && thisLayer.options) {
    echarts.dispose(this.$refs[layer][0])
    this.$refs[layer][0].style.width = ((this.singleWidth * thisVessel.col_num) / thisVessel.inner_col) * thisLayer.z_col + 'px'
    this.$refs[layer][0].style.height = ((this.singleheight * thisVessel.row_num) / thisVessel.inner_row) * thisLayer.z_row - (thisVessel.title_show ? thisVessel.title_height : 0) - (thisVessel.date_selector ? 40 : 0) + 'px'
    var myChart = echarts.init(this.$refs[layer][0], theme || '')
    if (this.$refs[layer][0].style.width && this.$refs[layer][0].style.height) {
fork icon26
star icon44
watch icon6

+ 5 other calls in file