OrgChartJS Docs

Navigation

You can navigate through the following ways:
  1. Mouse Scroll
  2. Pan
  3. Zoom

1. Mouse Scroll

Vertical and Horizontal scroll

Set mouseScrool option to OrgChart.action.scroll and you will be able to navigate with the mouse:

  • Scroll up/down
  • Press Shift key to sroll left/right
  • On Apple Magic Mouse or Logitech G502 you can scroll left/right/up/down without pressing the Shift key

Add scroll bars with the options showXScroll: OrgChart.scroll.visible and showYcroll: OrgChart.scroll.visible

Horizontal scroll only

In order to enable horizontal scroll bar set showXScroll to OrgChart.scroll.visible. Aslo you have an option to use the mouse scroll set mouseScrool to OrgChart.action.xScroll. Here is an example:

Vertical scroll only

Now set the showYScroll to OrgChart.scroll.visible and chage mouseScrool to OrgChart.action.yScroll

Scroll sensitivity

To increase or decrease sroll sensitivity change OrgChart.scroll.smooth and OrgChart.scroll.speed constants, the default values are:

 
    OrgChart.scroll.smooth = 12;
    OrgChart.scroll.speed = 12;  
    
Also you can change the sroll sensitivity for a specific browser. For example:
 
    OrgChart.scroll.safari = {
        smooth: 12,
        speed: 500
    };
    OrgChart.scroll.ie = { smooth: 12, speed: 200 };
    OrgChart.scroll.edge = { smooth: 12, speed: 200 };
    OrgChart.scroll.chrome = { smooth: 12, speed: 200 };
    OrgChart.scroll.firefox = { smooth: 12, speed: 200 };
    OrgChart.scroll.opera = { smooth: 12, speed: 200 };
    

2. Pan

Pan/move, left-click and hold mouse button in the OrgChart JS and drag the mouse in any direction. You cannot disable the Pan navigation.

3. Zoom

Chage mouseScrool to OrgChart.action.zoom. Here is the result:

4. Ctrl + Zoom

Chage mouseScrool to OrgChart.action.ctrlZoom. Here is the result:

5. Mini map

Show mini map over the tree.

Set miniMap option to true.