{
    backgroundColor: new echarts.graphic.RadialGradient(0.3, 0.3, 0.8, [{
        offset: 0,
        color: '#f7f8fa'
    }, {
        offset: 1,
        color: '#cdd0d5'
    }]),
    tooltip: {
        show:true,
        trigger:'item',
        formatter:(params , ticket , callback)=> {
            if ( params.data.value && params.data.msg )
                return params.data.value+"<br/>"+params.data.msg;
            else {
                return params.name;
            }
        }
    },
    legend: [{
        formatter: function(name) {
            return echarts.format.truncateText(name, 100, '14px Microsoft 
Yahei', '…');
        },
        tooltip: {
            show: true
        },
        textStyle:{
            fontSize:14
        },
        selectedMode: 'false',
        bottom: 20,
        data: []
    }],
    series: [{
        name: '详情',
        type: 'graph',
        layout: 'force',
        hoverAnimation:false,
        animation:false,
        
        force: {
            edgeLength: 50,
            repulsion: 200,
            gravity: 0.1
        },
        roam:'scale',
        nodeScaleRatio :0,
        textStyle: {
            fontSize: '30px'
        },
        
        data: [],
        links: [],
        categories: [],
        draggable:true,
        
        focusNodeAdjacency: true,
        dataZoom :[
            {
                type:'inside',
                start:80,
                zoomOnMouseWheel:false,
                xAxisIndex:[0],
                zoomLock:true
            }
        ],
        label: {
            normal: {
                show: true,
                position: 'top',

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

[ Full content available at: 
https://github.com/apache/incubator-echarts/issues/8947 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to