ç®€ä½“ä¸æ–‡ | English
📺 网站地�?� • 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
