Merge pull request #1228 from choizhang/fix-edge-label
fix(useLightragGraph): Change the label of the edge from type to keyword
This commit is contained in:
commit
22a4e08439
1 changed files with 2 additions and 2 deletions
|
|
@ -205,7 +205,7 @@ const createSigmaGraph = (rawGraph: RawGraph | null) => {
|
||||||
// Add edges from raw graph data
|
// Add edges from raw graph data
|
||||||
for (const rawEdge of rawGraph?.edges ?? []) {
|
for (const rawEdge of rawGraph?.edges ?? []) {
|
||||||
rawEdge.dynamicId = graph.addDirectedEdge(rawEdge.source, rawEdge.target, {
|
rawEdge.dynamicId = graph.addDirectedEdge(rawEdge.source, rawEdge.target, {
|
||||||
label: rawEdge.type || undefined
|
label: rawEdge.properties?.keywords || undefined
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -660,7 +660,7 @@ const useLightrangeGraph = () => {
|
||||||
|
|
||||||
// Add the edge to the sigma graph
|
// Add the edge to the sigma graph
|
||||||
newEdge.dynamicId = sigmaGraph.addDirectedEdge(newEdge.source, newEdge.target, {
|
newEdge.dynamicId = sigmaGraph.addDirectedEdge(newEdge.source, newEdge.target, {
|
||||||
label: newEdge.type || undefined
|
label: newEdge.properties?.keywords || undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add the edge to the raw graph
|
// Add the edge to the raw graph
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue