Configurations for a NVL instance

interface NvlOptions {
    allowDynamicMinZoom?: boolean;
    callbacks?: ExternalCallbacks;
    disableAria?: boolean;
    disableTelemetry?: boolean;
    disableWebGL?: boolean;
    disableWebWorkers?: boolean;
    disabledItemColor?: string;
    disabledItemFontColor?: string;
    frame?: HTMLElement;
    initialZoom?: number;
    instanceId?: string;
    layout?: Layout;
    layoutOptions?: LayoutOptions;
    layoutTimeLimit?: number;
    logging?: {
        level: LogLevelDesc;
    };
    maxZoom?: number;
    minZoom?: number;
    minimapContainer?: HTMLElement;
    nodeDefaultBorderColor?: string;
    panX?: number;
    panY?: number;
    relationshipThreshold?: number;
    renderer?: Renderer;
    selectedBorderColor?: string;
    styling?: {
        defaultNodeColor?: string;
        defaultRelationshipColor?: string;
        disabledItemColor?: string;
        disabledItemFontColor?: string;
        dropShadowColor?: string;
        minimapViewportBoxColor?: string;
        nodeDefaultBorderColor?: string;
        selectedBorderColor?: string;
        selectedInnerBorderColor?: string;
    };
    useWebGL?: boolean;
}

Properties

allowDynamicMinZoom?: boolean

Whether or not to dynamically allow decreasing minimum zoom value if current graph does not fit on screen at minimum zoom. When set to true, zoom and fit operations will allow zooming out further than the minimum zoom value if the graph does not fit on screen. When set to false, zoom and fit operations will stop at the minimum zoom value, even if the full graph does not fit on screen at that zoom level.

true
callbacks?: ExternalCallbacks
disableAria?: boolean

Disables ARIA attributes on the graph. By default, NVL adds ARIA attributes to the graph container to make it more accessible. Attributes include role="image", aria-label="Graph visualization" and aria-describedby="nvl-${instanceId}-description". The description element is a live region that will announce changes to the graph.

false
disableTelemetry?: boolean

Disables tracking of library usage

false
disableWebGL?: boolean

Whether or not to disable WebGL completely.

disableWebWorkers?: boolean

Disables the use of web workers for the layout calculations.

disabledItemColor?: string

The color to use for the disabled nodes and relationships

Use styling.disabledItemColor instead

disabledItemFontColor?: string

The color to use for the labels of the disabled nodes and relationships

Use styling.disabledItemFontColor instead

frame?: HTMLElement

The DOM element in which to render the graph visualization

initialZoom?: number

Zoom value of the current viewport

instanceId?: string

Id for uniquely identifying the instance of Nvl

layout?: Layout

The graph layout algorithm to be used

layoutOptions?: LayoutOptions

Configuration for the current layout

layoutTimeLimit?: number

Defines a time limit for how long layout iterations may run

logging?: {
    level: LogLevelDesc;
}

Specify the log level.

maxZoom?: number

The maximum zoom level allowed

10
minZoom?: number

The minimum zoom level allowed

0.075
minimapContainer?: HTMLElement

The DOM container in which to render the minimap.

When using a React ref, make sure the attached element is rendered before the NVL instance is created. Otherwise, the minimap will not be displayed.

nodeDefaultBorderColor?: string

The color to use for the default border of nodes

Use styling.nodeDefaultBorderColor instead

panX?: number

X-coordinate for panning of the current viewport

panY?: number

Y-coordinate for panning of the current viewport

relationshipThreshold?: number
renderer?: Renderer

What renderer to use Possible values are 'webgl' or 'canvas'

'webgl'
WebGL renderer uses GPU and has better performance.
Captions and arrowheads are only displayed when using the canvas renderer.
selectedBorderColor?: string

The color to use for the selected border of nodes

Use styling.selectedBorderColor instead

styling?: {
    defaultNodeColor?: string;
    defaultRelationshipColor?: string;
    disabledItemColor?: string;
    disabledItemFontColor?: string;
    dropShadowColor?: string;
    minimapViewportBoxColor?: string;
    nodeDefaultBorderColor?: string;
    selectedBorderColor?: string;
    selectedInnerBorderColor?: string;
}

Type declaration

  • OptionaldefaultNodeColor?: string
  • OptionaldefaultRelationshipColor?: string
  • OptionaldisabledItemColor?: string

    The color to use for the disabled nodes and relationships

  • OptionaldisabledItemFontColor?: string

    The color to use for the labels of the disabled nodes and relationships

  • OptionaldropShadowColor?: string

    The color to use for the drop shadow of selected/hovered nodes and relationships

  • OptionalminimapViewportBoxColor?: string

    The color to use for the viewport box in the minimap

  • OptionalnodeDefaultBorderColor?: string

    The color to use for the default border of nodes

  • OptionalselectedBorderColor?: string

    The color to use for the selected border of nodes and relationships

  • OptionalselectedInnerBorderColor?: string

    The color to use for the selected inner border of nodes and relationships

useWebGL?: boolean

use renderer instead Whether to user the Canvas or WebGL renderer Will be ignored when renderer is set