You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.8 KiB

/*
* @Author: your name
* @Date: 2021-10-14 19:32:39
* @LastEditTime: 2021-11-11 09:46:12
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /data-show/src/views/WeiboDetails/weiboSpreadFission/opt.js
*/
export default function createOpt(data) {
return {
tooltip: {
trigger: "item",
backgroundColor: "#08182F",
color: "#fff",
borderColor: "#3373CC",
textStyle: {
color: "#fff", //设置文字颜色
},
extraCssText: "box-shadow: 0px 0px 10px 0px #3373CC;"
},
title: {
show: false,
text: 'NPM Dependencies'
},
animationDurationUpdate: 1500,
animationEasingUpdate: 'quinticInOut',
series: [
{
type: 'graph',
layout: 'none',
// progressiveThreshold: 700,
data: data.nodes.map(function (node) {
return {
x: node.x,
y: node.y,
id: node.id,
name: node.name,
value: node.value,
symbolSize: node.symbolSize,
itemStyle: {
color: node.color
}
};
}),
links: data.edges.map(function (edge) {
return {
source: edge.source,
target: edge.target
};
}),
emphasis: {
focus: 'adjacency',
label: {
position: 'right',
show: true
}
},
label: {
show: true,
color: '#fff',
position: 'right',
formatter: '{b}'
},
labelLayout: {
hideOverlap: true
},
scaleLimit: {
min: 0.4,
max: 2
},
roam: true,
lineStyle: {
color: 'source',
width: 0.5,
curveness: 0.3,
opacity: 0.7
}
}
]
}
}