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

this.Chart.init is not a function有人解决了吗 #35

Open
s5mple opened this issue Aug 3, 2020 · 5 comments
Open

this.Chart.init is not a function有人解决了吗 #35

s5mple opened this issue Aug 3, 2020 · 5 comments

Comments

@s5mple
Copy link

s5mple commented Aug 3, 2020

No description provided.

@tgwstyle
Copy link

VM532:1 MiniProgramError
this.Chart.init is not a function
TypeError: this.Chart.init is not a function 哪一位大佬知道这是怎么回事

@leo43555483
Copy link

this.Chart.current?

@MoreCodeByTR
Copy link

大佬,这个问题最后怎么解决的啊

@zhangxk123
Copy link

解决方案(亲测有效):

  1. 将this.Chart 换成 getCurrentInstance().page.selectComponent('#mychart-area') // taro3无法获取到原生小程序组件
  2. 在app.config.js添加配置
usingComponents:` {
  "ec-canvas": "./ec-canvas/ec-canvas"/*路径根据自己项目的ec-canvas目录来*/
}
  1. 使用组件的时候,记得css设置下高度

@dfsfyt
Copy link

dfsfyt commented Oct 13, 2022

解决方案(亲测有效):

  1. 将this.Chart 换成 getCurrentInstance().page.selectComponent('#mychart-area') // taro3无法获取到原生小程序组件
  2. 在app.config.js添加配置
usingComponents:` {
  "ec-canvas": "./ec-canvas/ec-canvas"/*路径根据自己项目的ec-canvas目录来*/
}
  1. 使用组件的时候,记得css设置下高度

这个方法试了,不行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants