issue with Diagram Node Positioning

Why is the parent without a node appearing above? The node shouldn't be in the corner; it should be in its proper place. I'd like the parent without a node to appear separately. For your reference, I have attached the file.


Thanking you and regards,

Lakshmi Narayanan


Attachment: diagram_74c5aed3.rar

1 Reply

SJ Sivaranjith Jeyabalan Syncfusion Team April 15, 2024 12:45 PM UTC

Hi,

We have reviewed the sample you provided and noticed that some of the data sources lack parent or children data. As a result, they were not considered in the layout and were rendered at a 0 offset. We have addressed this by adjusting the data source to include parent-child relationships. Please find the updated sample below. If you have any questions or concerns, feel free to ask.


Code example:

    var data = [

        {

            "MemberId": "5", "ContactName": "Hanna Moos", "Parents": "4"

        }, {

            "MemberId": "6", "ContactName": "Hanna Moos"

        }, {

            "MemberId": "7", "ContactName": "Hanna Moos", "Parents": "6"

        }, {

            "MemberId": "8", "ContactName": "Hanna Moos", "Parents": "7"

        },

    ]

 


Here, the MemberId : 6,7, and 8 has no children and parents. So, we modified and highlighted that.


Note: In layout, each node must be either a parent or a child of another node.


Regards,

Sivaranjith


Attachment: diagramlayout_af1b3b41.zip

Loader.
Up arrow icon