# theme-set **Repository Path**: mirrors_antvis/theme-set ## Basic Information - **Project Name**: theme-set - **Description**: 💄 Customize theme for G2, G2Plot of AntV(孵化中) - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-28 - **Last Updated**: 2026-02-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 简体中文 | [English](./README.en-US.md)

ThemeSet

📺 网站地址G2G2Plot

AntV ThemeSet 是一款在线主题构建工具,致力于帮助使用者(工程师或设计师)快速直观定制自己的主题配置文件 ## 💡 如何使用 G2 提供了自定义主题机制以允许用户切换、定义图表主题。利用 ThemeSet 工具,工程师或者设计师可以在线设计图表通用主题规范,然后导出或复制主题配置,直接使用 `registerTheme` API 进行主题定制。 **G2 中使用**。详见:[自定义主题 | G2](https://g2.antv.vision/zh/docs/api/advanced/register-theme) ```ts import { registerTheme } from '@antv/g2'; // 方式 1: registerTheme('newTheme', { // 导出或复制出来的主题配置 }); chart.theme('newTheme'); // 方式 2: chart.theme({ // 导出或复制出来的主题配置 }); ``` **G2Plot 中使用**。详见:[图表主题 | G2Plot](https://g2plot.antv.vision/zh/docs/api/options/theme) ```ts 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: { // 导出或复制出来的主题配置 }, }); ``` ## ⌨️ 参与贡献 ```bash # 克隆仓库 git clone git@github.com:antvis/theme-set.git # 进入文件目录 cd theme-set # 安装依赖和开始 npm install && npm start # Open website: http://localhost:8000 ``` ## 📧 联系我们 钉钉群:30233731