Neo4j Visualization Library
    Preparing search index...

    Function StaticPictureWrapper

    • A React component that creates a static picture of a graph using NVL. This component is useful for generating static visualizations of graphs without requiring user interaction. The component automatically fits all nodes in the viewport before capturing the image NVL is automatically destroyed after capturing the image to free up resources.

      Parameters

      Returns Element | null

      An img element displaying the graph visualization, or null during rendering

      When showing many pictures at once, either set disableWebGL: true in nvlOptions or mount the components in batches to avoid exceeding the WebGL context limit of the browser. Otherwise, the browser may drop the oldest contexts and warn "Too many active WebGL contexts" when reaching its limit and some pictures can fail to render.

      <StaticPictureWrapper
      nodes={nodes}
      rels={relationships}
      width={500}
      height={500}
      />