-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: svg renderer not works in website demo #5000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加一个测试?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还需要把 renderer 和 plugins 从 options 里面解构出来,不然 chart.options 里面有这个两个配置,spec tab 会出问题:包含了 renderer 和 plugins。
class Chart {
constructor(options) {
this._renderer = options.renderer;
this._plugins = options.plugins;
}
}
相当于说 option 和 spec 不是一个东西,option 内容更多? |
constructor.options = 渲染器的配置(container,renderer,plugs)+ 图表的配置(spec) chart.options 返回和设置的是图表的配置 |
* fix: svg renderer not works in website demo * test: add testcase for renderer * refactor: move utils into another file
* fix: svg renderer not works in website demo * test: add testcase for renderer * refactor: move utils into another file
fixed #4990
因为 PR #4721 将用户传入的 renderer omit 了,所以使用了默认的 canvas 渲染。@lxfu1