@antv/g2plot
Version:
G2 Plot, a market of plots built with the Grammar of Graphics'
20 lines • 440 B
JavaScript
/**
* 所有的 plot theme object,每个图类型只会存在一个 theme
*/
var PLOT_THEME_MAP = {};
/**
* 注册新的图表主题
* @param type
* @param theme
*/
export function registerTheme(type, theme) {
PLOT_THEME_MAP[type.toLowerCase()] = theme;
}
/**
* 根据类型获取主题
* @param type
*/
export function getTheme(type) {
return PLOT_THEME_MAP[type.toLowerCase()] || {};
}
//# sourceMappingURL=theme.js.map