VChart/packages/vchart-theme
2023-11-01 10:07:44 +08:00
..
__tests__ feat: update volcano theme 2023-11-01 10:07:44 +08:00
public fix: code review problems 2023-11-01 10:07:44 +08:00
src fix: code review problems 2023-11-01 10:07:44 +08:00
.eslintignore feat: add vchart-types and vchart-theme 2023-11-01 10:07:44 +08:00
.eslintrc.js feat: update volcano theme 2023-11-01 10:07:44 +08:00
bundler.config.js feat: add vchart-types and vchart-theme 2023-11-01 10:07:44 +08:00
jest.config.js feat: add vchart-types and vchart-theme 2023-11-01 10:07:44 +08:00
package.json fix: code review problems 2023-11-01 10:07:44 +08:00
README.md fix: code review problems 2023-11-01 10:07:44 +08:00
tsconfig.eslint.json feat: add vchart-types and vchart-theme 2023-11-01 10:07:44 +08:00
tsconfig.json feat: add vchart-types and vchart-theme 2023-11-01 10:07:44 +08:00
tsconfig.test.json feat: add vchart-types and vchart-theme 2023-11-01 10:07:44 +08:00

@visactor/vchart-theme

Description

The extension themes for VChart.

The list of themes included here is as follows, with links to the theme JSON files:

Usage

Import the full theme map and register them in sequence:

import { allThemeMap } from '@visactor/vchart-theme';
import VChart from '@visactor/vchart';

// register themes
allThemeMap.forEach((theme, name) => {
  VChart.ThemeManager.registerTheme(name, theme);
});

// apply a theme
VChart.ThemeManager.setCurrentTheme('vScreenVolcanoBlue');

If you only use a specific theme, you can also obtain the specific theme JSON from this package and place it under your project for reference:

import vScreenVolcanoBlue from 'xxx'; // your json path
import VChart from '@visactor/vchart';

// register the theme
VChart.ThemeManager.registerTheme('vScreenVolcanoBlue', vScreenVolcanoBlue);

// apply the theme
VChart.ThemeManager.setCurrentTheme('vScreenVolcanoBlue');

Debug

Run the following command from any location in the project to start the dev server:

rush theme