In this scenario, Graph instance’s width and height must be number, so can’t use 100% as value:
https://codesandbox.io/s/mo-ban-wchooy?file=/src/App.tsx
const graph = new Graph({
container: containerRef.current!,
width: 600,
height: 800,
background: {
color: "#F2F7FA"
}
});
so how to let the graph fill the parent div?
>Solution :
Just write the code like this:
const graph = new Graph({
width: document.body.clientWidth,
height: document.body.clientHeight,
});