When I render a graph following the readme, and put the graph in a dom node with a set width and height, the graph is rendered with 0 width and height:
If I manually expand the graph size manually in the chrome inspector, it shows the grid with mouse interactivity, however neither of the two nodes show up in the graph that i can find.
I'm doing this in React, but react isn't doing anything here, I'm following the readme:
useEffect(() => {
const schema = {
nodes: {
0: {
name: 'Hello',
fill: 'red',
},
1: {
name: 'World',
fill: 'green',
},
},
edges: {
0: {
from: [0], // this edge can connect nodes of type 0
to: [1], // to nodes of type 1,
stroke: 'blue',
},
},
};
const graph = new PcGraph(schema);
if (graphRef.current) {
graphRef.current.appendChild(graph.dom);
}
}, [graphRef]);
When I render a graph following the readme, and put the graph in a dom node with a set width and height, the graph is rendered with 0 width and height:
If I manually expand the graph size manually in the chrome inspector, it shows the grid with mouse interactivity, however neither of the two nodes show up in the graph that i can find.
I'm doing this in React, but react isn't doing anything here, I'm following the readme: