样式图
代码
- hotOption.js
export const hotOptions = {
//数据项
animationEasingUpdate: "bounceIn",//数据更新动画的缓动效果。
top: "10%",
bottom: "10%",
series: [
{
type: "graph",
layout: "force",//采用力引导布局
force: {
repulsion: 0,//节点之间的斥力因子。值越大则斥力越大
gravity: 0.1,//节点受到的向中心的引力因子。该值越大节点越往中心点靠拢。
layoutAnimation: true,//因为力引导布局会在多次迭代后才会稳定,这个参数决定是否显示布局的迭代动画
edgeLength: [10, 50],//边的两个节点之间的距离
},
// 是否开启鼠标缩放和平移漫游
roam: true,
label: {
position: ["50%", "50%"],
normal: {
show: true,
textStyle: {
align: "center",
rich: {
a: