-
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
4.x 如何注册主题, 如何动态切换主题 #2258
Labels
Comments
chart.theme('dark');
chart.render(true); // 关键一步,需要手动更新
抱歉,文档没有补充完整,等下我补充下。 |
恩,文档我在更新了。 目前主题设置这里有个问题,就是如果传入 chart.theme() 方法的参数是字符串,即已经注册的主题名的话 ,内部还会和默认的主题 merge 一边,这样在你这个场景下就增加了一倍对象复制开销,这个我今天修复一下。 另外如果支持更新色板的话,可以直接: chart.theme({
defaultColor: '',
colors10: [],
}); |
恩,是个 BUG, 4.0.4 版本会修复 |
simaQ
added a commit
that referenced
this issue
Apr 2, 2020
simaQ
added a commit
that referenced
this issue
Apr 2, 2020
Merged
simaQ
added a commit
that referenced
this issue
Apr 2, 2020
simaQ
added a commit
that referenced
this issue
Apr 2, 2020
hustcc
pushed a commit
that referenced
this issue
Apr 3, 2020
hustcc
pushed a commit
that referenced
this issue
Apr 3, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://antv-g2.gitee.io/zh/docs/manual/tutorial/theme
按照文档无法注册主题,并且动态切换他
能否提供一个思路
官网没有提供主题模板,通过全局的getTheme可以看到主题参数,我该怎么做?
复制 getTheme的结果json 保存到本机文件?
The text was updated successfully, but these errors were encountered: