赞
踩
一. Api使用
二. vue使用
- <template lang='pug'>
- div.force-pane(:id="id")
- svg
- </template>
- <script>
- /**
- * 力导向图
- */
- import * as d3 from 'd3'
- let gs = '',
- forceSimulation = '',
- links = '',
- linksText = ''
- let nodes = [{ name: '湖南' }, { name: '毛泽东' }, { name: '主席' }]
-
- let edges = [
- { source: 0, target: 1, relation: '籍贯', value: 1.3 },
- { source: 1, target: 2, relation: '职责', value: 1 }
- ]
- export default {
- name: 'Scale',
- data() {
- return {
- id: ''
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。