Neo4j Visualization Library
    Preparing search index...

    Interface BasicReactWrapperProps

    The properties that can be passed to the BasicNvlWrapper component.

    interface BasicReactWrapperProps {
        nodes: Node[];
        nvlCallbacks?: ExternalCallbacks;
        nvlOptions?: NvlOptions;
        onInitializationError?: (error: unknown) => void;
        pan?: { x: number; y: number };
        positions?: Node[];
        rels: Relationship[];
        zoom?: number;
    }

    Hierarchy (View Summary)

    Index
    nodes: Node[]

    The nodes of the graph of type Node[]

    nvlCallbacks?: ExternalCallbacks

    An object containing functions for callbacks on certain actions.

    Passed to the NVL constructor once; later changes to this prop are ignored. Read changing state through a ref inside the callbacks instead of redefining them.

    nvlOptions?: NvlOptions

    An object containing options for the Nvl instance.

    If minimapContainer is present it must be a non-null element before NVL is created, otherwise creation is deferred until it is.

    onInitializationError?: (error: unknown) => void

    A callback to handle any errors that happen during NVL initialization

    pan?: { x: number; y: number }

    Sets the pan coordinates of the viewport using the setPan method.

    Type Declaration

    • x: number

      The x coordinate of the pan.

    • y: number

      The y coordinate of the pan.

    If both zoom and pan are provided, the setZoomAndPan method will be used.

    positions?: Node[]

    Sets the positions of the nodes in the graph using the setNodePositions method.

    Applied whenever the array reference changes and is non-empty. This is the way to position nodes. Do not set x and y on nodes directly.

    rels: Relationship[]

    The rels of the graph of type Relationship[]

    zoom?: number

    Sets the zoom level of the viewport using the setZoom method.

    If both zoom and pan are provided, the setZoomAndPan method will be used.