diff --git a/src/render/renderGraph.js b/src/render/renderGraph.js index b4585d28..072ed54c 100644 --- a/src/render/renderGraph.js +++ b/src/render/renderGraph.js @@ -21,7 +21,7 @@ export const setupGraph = (rankDir) => { export const setNodes = (nodes, g) => { nodes.forEach((node) => { g.setNode(node.recordId || node.id, { - id: node.recordId || node.id, + id: `node_${node.recordId || node.id}`, label: node.label, class: node.class || '', labelType: node.labelType || 'string', @@ -37,7 +37,7 @@ export const setNodes = (nodes, g) => { export const setEdges = (edges, g) => { edges.forEach((edge) => { g.setEdge(edge.source, edge.target, { - id: edge.recordId || edge.id, + id: `edge_${edge.recordId || edge.id}`, class: edge.class || '', edgeType: edge.interestRelationship, description: edge.description, diff --git a/src/render/renderUI.js b/src/render/renderUI.js index edf89c70..94803307 100644 --- a/src/render/renderUI.js +++ b/src/render/renderUI.js @@ -91,9 +91,9 @@ const getDescription = (description) => { } // Output the descriptions subset as key value pairs on new lines - return `Statement date: ${description.statementDate}\nRecord ID: ${description.recordId}\n${ - identifiers.length > 0 ? identifiersOutput : '' - }${interests.length > 0 ? interestsOutput : ''}`; + return `Statement date: ${description.statementDate}\n${ + description.recordId !== null ? 'Record ID: ' + description.recordId + '\n' : '' + }${identifiers.length > 0 ? identifiersOutput : ''}${interests.length > 0 ? interestsOutput : ''}`; }; // Configure tippy.js