晚上好,我的网络图有以下设置:
const exceptionsGraph = {
nodes: graph,
edges: edges
}
// Graph Options
const options = {
height: "80%",
width: "100%",
nodes: {
shape: "dot",
size: 16
},
layout: {
hierarchical: false
},
physics: {
forceAtlas2Based: {
gravitationalConstant: -26,
centralGravity: 0.005,
springLength: 230,
springConstant: 0.18,
},
maxVelocity: 146,
solver: "forceAtlas2Based",
timestep: 0.35,
stabilization: {
enabled: true,
iterations: 2000,
updateInterval: 25,
},
},
edges: {
color: "#abb4be"
}
}
然后我这样称呼它:
<Graph graph={exceptionsGraph} options={options} />
但是当它渲染时,它都被放大了,所以看起来很糟糕。像这样:
我希望它看起来像这样:
我怎样才能在 React 上实现这一点?
提前致谢