Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import G2, { Shape, PathUtil, Animate } from '@antv/g2/lib/core';
import Util from './shared/util';
import Themes from './themes';
import * as components from './components';
G2.Global.trackingInfo = { bizcharts: '3.2.2-beta.4' };
// G2.Global.animate = false;
const BizCharts = Util.mix(components, {
G2,
Util,
Shape,
Animate,
PathUtil,
track(enable = false) {
// for srs
G2.track(enable);
},
setTheme(theme) {
let themeObj = theme;
if (typeof theme === 'string' && Themes[theme]) {
setTheme(theme) {
let themeObj = theme;
if (typeof theme === 'string' && Themes[theme]) {
themeObj = Themes[theme];
}
G2.Global.setTheme(themeObj);
},
});