Coder Social home page Coder Social logo

antvis / theme-set Goto Github PK

View Code? Open in Web Editor NEW
35.0 21.0 7.0 34.76 MB

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

Home Page: https://theme-set.antv.vision

License: MIT License

JavaScript 1.37% Less 12.58% TypeScript 85.93% Shell 0.11%
g2plot antvis g2 theme

theme-set's Introduction

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

// 方式 2:
const plot = new Line({
  // ... 折线图的其他配置
  theme: {
    // 导出或复制出来的主题配置
  },
});
// 或者
plot.update({
  theme: {
    // 导出或复制出来的主题配置
  },
});

⌨️ 参与贡献

# 克隆仓库
git clone [email protected]:antvis/theme-set.git

# 进入文件目录
cd theme-set

# 安装依赖和开始
npm install && npm start

# Open website: http://localhost:8000

📧 联系我们

钉钉群:30233731

theme-set's People

Contributors

visiky avatar yp0413150120 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theme-set's Issues

执行 yarn start 报错,提示无法使用装饰器

报错内容:
experimental syntax 'decorators-legacy' isn't currently enabled

怀疑是没有锁依赖版本导致的。

解决方案:

yarn add @babel/plugin-proposal-decorators -D

在项目根目录新建配置文件 .babelrc, 然后使用下面的配置

{
  "plugins": [
    [
      "@babel/plugin-proposal-decorators",
      {
        "legacy": true
      }
    ]
  ],
  "presets": [
    [
      "babel-preset-gatsby",
      {
        "targets": {
          "browsers": [
            ">0.25%",
            "not dead"
          ]
        }
      }
    ]
  ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.