Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Enumeration members

centerNode

OrgChart.action.centerNode = 9;

let chart = new OrgChart('#tree', {
});
chart.onInit(() => {
chart.center(2);
console.log(chart.manager.action);
});
chart.load(nodes)
collapse

OrgChart.action.collapse = 1;

let chart = new OrgChart('#tree', {
});
chart.onRedraw(() => {
if (chart.manager.action == OrgChart.action.collapse) {
chart.fit();
}
});
chart.load(nodes)
ctrlZoom

Set Ctrl + mouse scroll to zoom OrgChart.action.ctrlZoom = 22;

let chart = new OrgChart('#tree', {
mouseScrool: OrgChart.action.ctrlZoom,
});
details

Opens the details form OrgChart.action.details = 13;

let chart = new OrgChart('#tree', {
nodeMouseClick: OrgChart.action.edit // default value
});
chart.onNodeClick(function (args) {
if (args.node.templateName == "group")
chart.config.nodeMouseClick = OrgChart.action.pan;
esle
chart.config.nodeMouseClick = OrgChart.action.details;
});
edit

Opens edit form on node click OrgChart.action.edit = 1;

let chart = new OrgChart('#tree', {
nodeMouseClick: OrgChart.action.edit
});
expand

OrgChart.action.expand = 0;

let chart = new OrgChart('#tree', {
});
chart.onRedraw(() => {
if (chart.manager.action == OrgChart.action.expand) {
chart.fit();
}
});
chart.load(nodes)
expandCollapse

Expand/Collapse on node click OrgChart.action.expandCollapse = 501;

let chart = new OrgChart('#tree', {
odeMouseClick: OrgChart.action.expandCollapse,
});
exporting

OrgChart.action.exporting = 14;

let chart = new OrgChart('#tree', {
});
chart.on("field", function (sender, args) {
if (sender.manager.action == OrgChart.action.exporting) {
args.value = "hidden";
}
});
chart.load(nodes)
init

Reload/Initialize the chart OrgChart.action.init = 6;

document.getElementById("btn").addEventListener("click", function () {
chart.add({ id: 4, pid: 2, name: "Elliot Patel", title: "Sales" });
chart.draw(OrgChart.action.init);
});
none

Do nothing on mouse scroll OrgChart.action.none = 5;

let chart = new OrgChart('#tree', {
odeMouseClick: OrgChart.action.nonde,
});
pan

Expand/Collapse on node click OrgChart.action.expandCollapse = 501;

let chart = new OrgChart('#tree', {
odeMouseClick: OrgChart.action.expandCollapse,
});
scroll

Navigate with the mouse: Scroll up/down Press Shift key to scroll left/right Press Ctrl key to zoom with mouse scroll button On Apple Magic Mouse or Logitech G502 you can scroll left/right/up/down without pressing the Shift key OrgChart.action.scroll = 41;

let chart = new OrgChart('#tree', {
mouseScrool: OrgChart.action.scroll,
});
update

OrgChart.action.update = 7;

let chart = new OrgChart('#tree', {
});
chart.onRedraw(() => {
if (chart.manager.action == OrgChart.action.update) {
alert("chart updated");
}
});
chart.load(nodes)
xScroll

Set mouse scroll to horizontal scroll OrgChart.action.xScroll = 3;

let chart = new OrgChart('#tree', {
mouseScrool: OrgChart.action.xScroll,
});
yScroll

Set mouse scroll to vertical scroll OrgChart.action.yScroll = 4;

let chart = new OrgChart('#tree', {
mouseScrool: OrgChart.action.yScroll,
});
zoom

Set mouse scroll to zoom OrgChart.action.zoom = 2;

let chart = new OrgChart('#tree', {
mouseScrool: OrgChart.action.zoom,
});

Legend

  • Constructor
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme

Generated using TypeDoc