Skip to content

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

License

Notifications You must be signed in to change notification settings

antvis/theme-set

Repository files navigation

简体中文 | English

ThemeSet

📺 网站地�?� • G2 • G2Plot

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', {
  // 导出或�?制出�?�的主题�?置
});
const plot = new Line({
  // ... 折线图的其他�?置
  theme: 'newTheme',
});
// 或者
plot.update({ theme: 'newTheme' });

// 方�? 2:
const plot = new Line({
  // ... 折线图的其他�?置
  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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published