Open oaoxd0314 opened 2 years ago
Has any solution?
The events you can use are listed here: https://visjs.github.io/vis-network/docs/network/#Events
If you want to call functions on the network object, you can access it using the component's state like this:
const [network, setNetwork] = useState({})
const events = {
stabilized: function () {
network.fit()
},
}
return (
<Graph
graph={graph}
options={options}
events={events}
getNetwork={setNetwork}
/>
)
Hi ! I want to resize chart, because it's too small![image](https://user-images.githubusercontent.com/48309943/135262621-e9719646-7f77-4fce-9e8e-5873c9c2b5c1.png)
and i found in doc
moveTo
&once
can help me set scale in the beginningbut i can't use that kind function in
event
,is there any better way to help me resize chart in the first time or use
once
andmoveTo
plz