Arjun Choudhary
Arjun Choudhary

Reputation: 203

GetOrgChart not properly working with more than 2500 nodes

I am using GetOrgChart to show more than 2500 nodes and i am facing lots of problem which i've menstioned below.

  1. Chart is not in center.
  2. Since on Page load it looks like a thin line,forcefully i have to press zoom in button to see chart.
  3. If i zoom in/out using mouse scroll than this thin line will disapeared and not found again.
  4. If i search a node in search box, chart will zoom out and it again become a thin line i have to zoom in again to see the chart.
  5. After search, identified node is not blinking.

see below image

enter image description here

Below is my code

<!DOCTYPE html>
<html>
<head>
    <title>OrgChart | First Look</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <script src="getorgchart.js"></script>
    <link href="getorgchart.css" rel="stylesheet" />

    <style type="text/css">
        html, body {
            margin: 0px;
            padding: 0px;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }


        #people {
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <div id="people"></div>
<script type="text/javascript">
        var peopleElement = document.getElementById("people");
        var orgChart = new getOrgChart(peopleElement, {
            primaryFields: ["name", "title"],
            dataSource: myData
        });
</script>
</body>
</html>

Upvotes: 1

Views: 340

Answers (1)

Komang Suryadana
Komang Suryadana

Reputation: 696

You can add this option for make a beautiful view.

boxSizeInPercentage: {
    minBoxSize: {
        width: 5,
        height: 5
    },
    boxSize: {
        width: 15,
        height: 75
    },
    maxBoxSize: {
        width: 100,
        height: 100
    }
},

Upvotes: 1

Related Questions