UNPKG

@antv/g2plot

Version:

G2 Plot, a market of plots built with the Grammar of Graphics'

24 lines 571 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * 所有的 plot theme object,每个图类型只会存在一个 theme */ var PLOT_THEME_MAP = {}; /** * 注册新的图表主题 * @param type * @param theme */ function registerTheme(type, theme) { PLOT_THEME_MAP[type.toLowerCase()] = theme; } exports.registerTheme = registerTheme; /** * 根据类型获取主题 * @param type */ function getTheme(type) { return PLOT_THEME_MAP[type.toLowerCase()] || {}; } exports.getTheme = getTheme; //# sourceMappingURL=theme.js.map