README
shuCGDAtlas
这是一个以 antv/g6 为基础的高阶封装知识图谱组件,其中包括力导图、同心圆、雷达图、思维导图(双向树、左向树、右向树)等布局,并且支持各个节点、关系的样式做自定义配置(单独配置、统一配置)。
安装和快速上手
npm 安装
安装依赖包
- shu-c-gdatlas
npm i shu-c-gdatlas --save
- g6
npm i @@antv/g6 --save
- lodash (帮助函数插件)
lodash
如果使用的是脚手架那么可能脚手架已经帮你安装了(比如:Vue CLI)。
npm i lodash --save
CDN
cdn 服务网络js文件暂未发布,如果需要使用请至目录:
node_modules
└──shu-c-gdchart
└──lib
└──iife
└──shu-c-gdatlas.common.js
将shu-c-gdchart.js
拷贝到你项目中的 static 目录内,然后使用:
<script src="/static/shu-c-gdatlas.common.js"></script>
main.js
- webpack中使用,lodash、antv/g6请使用
script
引入到项目的html页面中
import Vue from 'vue';
Vue.use(window.shuCGDAtlas.install);
new Vue({
render: h => h(App)
}).$mount('#app')
快速上手
webpack
在 main.js 中写入以下内容:
import shuCGdAtlas from 'shu-c-gdatlas';
import 'shu-c-gdatlas/lib/cjs/theme-default/index.css';
Vue.use(shuCGdAtlas);
new Vue({
render: h => h(App)
}).$mount('#app')
Browsers support
Modern browsers and IE10.
IE / Edge | Firefox | Chrome | Safari | Opera |
---|---|---|---|---|
IE10, Edge | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
last 2 versions 每个浏览器最新的两个版本