Skip to content

Repository files navigation

简体中文 | English

ThemeSet

📺 网站地址G2G2Plot

AntV ThemeSet 是一款在线主题构建工具,致力于帮助使用者(工程师或设计师)快速直观定制自己的主题配置文件

💡 如何使用

G2 提供了自定义主题机制以允许用户切换、定义图表主题。利用 ThemeSet 工具,工程师或者设计师可以在线设计图表通用主题规范,然后导出或复制主题配置,直接使用 registerTheme API 进行主题定制。

G2 中使用。详见:自定义主题 | G2

import{registerTheme}from'@antv/g2';// 方式 1:registerTheme('newTheme',{// 导出或复制出来的主题配置});chart.theme('newTheme');// 方式 2:chart.theme({// 导出或复制出来的主题配置});

G2Plot 中使用。详见:图表主题 | G2Plot

import{G2}from'@antv/g2plot';// 方式 1:G2.registerTheme('newTheme',{// 导出或复制出来的主题配置});constplot=newLine({// ... 折线图的其他配置theme: 'newTheme',});// 或者plot.update({theme: 'newTheme'});// 方式 2:constplot=newLine({// ... 折线图的其他配置theme: {// 导出或复制出来的主题配置},});// 或者plot.update({theme: {// 导出或复制出来的主题配置},});

⌨️ 参与贡献

# 克隆仓库
git clone git@github.com:antvis/theme-set.git
# 进入文件目录cd theme-set
# 安装依赖和开始
npm install && npm start
# Open website: http://localhost:8000

📧 联系我们

钉钉群:30233731

About

💄 Customize theme for G2, G2Plot of AntV(孵化中)

Topics

Resources

Security policy

Stars

36 stars

Watchers

19 watching

Forks

Releases

Packages

Used by

Contributors

Languages