Bootstrap

echarts graph搭配lines形成动效关系图

<template>

  <div style="width: 800px; height: 600px" ref="chart"></div>

</template>

<script>

import * as echarts from 'echarts';

export default {

  mounted() {

    this.initChart();

  },

  methods: {

    initChart() {

      const chart = echarts.init(this.$refs.chart);

      let dataMap = new Map();

      const data = {

        nodes: [

          { name: 'Node1' },

          { name: 'Node2' },

          { name: 'Node3' },

          { name: 'Node4' },

          { name: 'Node5' },

          { name: 'Node6' },

          { name: 'Node7' }

        ],

        links: []

      };

      data.nodes = data.n

;