Skip to main content

Graph inputs & outputs

Inputs#

Inputs that can be passed to the graphy-ng component:

NameTypeDefaultDescription
curved3shape.CurveFactoryd3shape.curveBasisThe D3 curve used for defining the shape of edges (from 'd3-shape' library). Available options can be found here.
enableZoomingbooleantrueWhether to enable zooming.
enablePanningbooleantrueWhether to enable panning.
zoomSpeednumber0.1The speed of zooming in/out, if zoom is enabled.
invertZoomDirectionbooleanfalseWhether to reverse the zoom direction, if zoom is enabled.
centerOnChangesbooleanfalseWhether to center the graph on any input changes to nodes or edges.
directionGraphDirectionGraphDirection.TOP_TO_BOTTOMThe direction of the graph layout. For example, using GraphOrientation.LEFT_TO_RIGHT in an acyclic graph will cause edges to point from the left to the right.
marginXnumber0Number of pixels to use as a margin around the left and right of the graph.
marginYnumber0Number of pixels to use as a margin around the top and bottom of the graph.
widthstring'100%'The width of the graph (eg. '600px').
heightstring'100%'The height of the graph (eg. '600px').

Outputs#

Outputs emitted by the graphy-ng component:

NameTypeDescription
onCentervoidEvent emitted when centering the graph.
onZoomvoidEvent emitted when zooming in/out of the graph.
onPanvoidEvent emitted when the graph is being panned.