Skip to content

Network Nodes are rendered beyond the dimension #2811

Description

@ppjain-cisco

Describe/explain the bug
I am utilizing Network . The issue pertains to the increased number of nodes; they are not being rendered within the confines of the canvas size, resulting in nodes being displayed beyond the canvas boundaries, which is causing them to be cut off.

To Reproduce
Adjust the repulsivity and centeringStrength and see, the nodes are cut and there is no scrollbar.

Steps to reproduce the behavior:

  1. Go to https://nivo.rocks/network/
  2. Click on adjust the repulsivity and centeringStrength and see, the nodes are cut and there is no scrollbar.
  3. See error in the attached screen shot

Expected behavior
Nodes should be rendered within the dimension. and the graph should be scrollable to reach all the nodes.

Screenshots

Image

Desktop (please complete the following information):

  • OS - all
  • Browser - all

Additional context
I have multiple range of network from 15 nodes to 150 nodes, the link distance is constant to 160.
I tried following both ways

  1. Setting constant centeringStrength and repulsivity for all the ranges.
  2. Setting dynamic centeringStrength and repulsivity based on number of node count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions