Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

矩形树图多层下钻点击报错(RangeError: Maximum call stack size exceeded) #3159

Closed
flym1013 opened this issue Dec 24, 2020 · 1 comment
Labels

Comments

@flym1013
Copy link

flym1013 commented Dec 24, 2020

实现矩形树图下钻功能,每次数据更新调用chart.changeData(val),但点击层级多了就报错,RangeError: Maximum call stack size exceeded(超过最大调用堆栈大小)
主要代码实现片段

watch: {
    data(val) {
      if (val.length) {
        this.$nextTick(() => {
          if(this.chart) {
            this.chart.changeData(val)
          } else {
            this.init()
          }
        })
      }
    },
    deep: true
  },
 methods: {
  init(val) {
   this.chart = new Chart({
          container: 'rectangleChartPlus',
          autoFit: true,
          padding: 'auto',
          height: 500,
        })
  this.chart.data(val)
  }
}

image

@flym1013 flym1013 changed the title 关系图多层下钻点击报错(RangeError: Maximum call stack size exceeded) 矩形树图多层下钻点击报错(RangeError: Maximum call stack size exceeded) Dec 24, 2020
@hustcc
Copy link
Member

hustcc commented Jan 29, 2021

求提供一个最简的 G2 可复现的 demo,用于排除是 vue 上的封装导致的。

@hustcc hustcc added the Invalid label Jan 29, 2021
@hustcc hustcc closed this as completed Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants