1 Star 0 Fork 59

eqera / G2

forked from antv / G2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.js 857 Bytes
一键复制 编辑 原始数据 按行查看 历史
绝云 提交于 2017-10-18 15:03 . all dependent packages replaced
const G = require('@antv/g');
const Animate = require('./src/animate/animate');
const Chart = require('./src/chart/chart');
const Global = require('./src/global');
const Scale = require('./src/scale/index');
const Shape = require('./src/geom/shape/');
const Util = require('./src/util');
const G2 = {
// version
version: Global.version,
// visual encoding
Animate,
Chart,
Global,
Scale,
Shape,
Util,
// render engine
G,
DomUtil: G.DomUtil,
MatrixUtil: G.MatrixUtil,
PathUtil: G.PathUtil
};
G2.track = function(enable) {
Global.trackable = enable;
};
require('./src/track');
// 保证两个版本共存
if (typeof window !== 'undefined') {
if (window.G2) {
console.warn(`There are multiple versions of G2. Version ${G2.version}'s reference is 'window.G2_3'`);
} else {
window.G2 = G2;
}
}
module.exports = G2;
JavaScript
1
https://gitee.com/tornado12345/g2.git
git@gitee.com:tornado12345/g2.git
tornado12345
g2
G2
master

搜索帮助