D3GraphCanvas

new D3GraphCanvas(config, handleZoom, formatResponse)

Create a new D3 graph from a JSON object. Adapted from https://observablehq.com/@d3/force-directed-graph#chart and https://www.d3indepth.com/zoom-and-pan/

Parameters:
NameTypeDescription
configobject

The sparqlModule configuration.

Properties
NameTypeDescription
heightnumber

The SVG canvas height.

widthnumber

The SVG canvas width.

fontSizenumber

The font size to use for node and link labels.

namespaceLabelsobject

Prefix declarations which will replace text labels in the Legend. This doesn't (yet) affect the legend font size.

handleZoomfunction

The function that handles the zoom.

formatResponsefunction

The function that formats the response from JSON into a list of nodes and links.