npm package依赖

描述:当前是关于Echarts图表中的 关系图 示例。
 
            const subtext="create-react-app";
var my_links=[];
var my_data=[];


option = {
    title: {
        text: "npm package依赖",
        subtext: subtext,
    },
    tooltip: {},
    legend: [{
        formatter: function(name) {
            return echarts.format.truncateText(name, 40, '14px Microsoft Yahei', '…');
        },
        tooltip: {
            show: true
        },
        selectedMode: 'false',
        bottom: 20,
        data: ['无重复']
    }],
    toolbox: {
        show: true,
        feature: {
            dataView: {
                show: true,
                readOnly: true
            },
            restore: {
                show: true
            },
            saveAsImage: {
                show: true
            }
        }
    },
    animationDuration: 3000,
    animationEasingUpdate: 'quinticInOut',
    series: [{
        name: '三国演义',
        type: 'graph',
        layout: 'force',

        force: {
            repulsion: 300
        },
        data: my_data,
        links: my_links,
        categories: [{name:'无重复'}],
        focusNodeAdjacency: true,
        roam: true,
        label: {
            normal: {

                show: true,
                position: 'top',

            }
        },
        lineStyle: {
            normal: {
                color: 'source',
                curveness: 0,
                type: "solid"
            }
        }
    }]
};