Vis.js Adds Extra Padding at the Top of a Complex Diagram #2150
Unanswered
master-chief-2009
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been working with vis.js to create a complex diagram, and I've encountered an issue that persists even in a simplified version of my project. The core of the problem is that, when I draw a large diagram, it seems to automatically add extra padding at the top, effectively pushing the diagram down.
This issue becomes more pronounced as the size of the diagram increases. For example, with var number_of_nodes = 100, the diagram gets pushed down by approximately half of the screen's height. However, with var number_of_nodes = 10, the extra padding is much less noticeable.
To reproduce the issue, you'll need to set number_of_nodes to 100. I've created a complete example on jsfiddle, which can be found here: https://jsfiddle.net/master_chief/zy1Lfx2q/. Note: The number_of_nodes value needs to be updated to 100 in the example to observe the issue as described.
I have attempted step-by-step debugging but haven't been able to identify the cause of this unwanted padding. Does anyone see any obvious mistakes in my code, or has anyone encountered a similar issue and found a solution?
Beta Was this translation helpful? Give feedback.
All reactions