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

echarts 不显示也不报错 #25

Closed
hevan opened this issue Sep 11, 2017 · 8 comments
Closed

echarts 不显示也不报错 #25

hevan opened this issue Sep 11, 2017 · 8 comments

Comments

@hevan
Copy link

hevan commented Sep 11, 2017

使用ng2-admin 引入 echarts 不报错,也不显示

@xieziyu
Copy link
Owner

xieziyu commented Sep 11, 2017

@hevan
对于ng2-admin,你需要在 config/webpack.common.js 中的ProvidePlugin配置里面添加echarts的引用:

new webpack.ProvidePlugin({
  ...,
  echarts: "echarts"
}),

@hevan
Copy link
Author

hevan commented Sep 11, 2017

Thanks,
但是我用的是ng2-admin 当前的版本,采用的是angular-cli 方式 ,采用的@ngtools,我需要在对应的@ngtools 增加么?angular-cli.json 已经添加
"../node_modules/echarts/dist/echarts.min.js"

@xieziyu
Copy link
Owner

xieziyu commented Sep 11, 2017

@hevan 如果是当前采用angular-cli的版本,则不需要额外的配置。对于这个不显示的问题,需要检查你的参数了,是否传入ngx-echarts的options为空?

@hevan
Copy link
Author

hevan commented Sep 13, 2017

@xieziyu options 有值,Echarts 没有渲染,不知道是不是用的angular-cli , 1.3.x的原因

@xieziyu
Copy link
Owner

xieziyu commented Sep 13, 2017

@hevan angular-cli版本对此没有影响,我们自己的项目中用的也是1.3.x版本。需要看具体的代码片段来确定问题

@jianping-grp
Copy link

哥们,你怎么解决的。同样的问题。没有渲染

@monkey-yu
Copy link

同上,同样的问题。 options 有值,Echarts 没有渲染 。 怎么解决的 ,求回复

@monkey-yu
Copy link

我的问题解决了 ,可以了 。 写了高度的css 文件忘记引入到@component 里了,偶然写为行内样式可以了。

@xieziyu xieziyu closed this as completed Nov 22, 2017
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

4 participants