OrgChartModel
The OrgChartModel provides common functionality to interact with the OrgChart component.
Props
Name | Description | Type |
---|---|---|
addGraphUpdatedListener | Adds a listener called whenever organization chart items are shown or hidden. | ( |
applyLayout | Refreshes the organization chart layout. If the incremental parameter is set to true, the layout considers certain items as fixed and arranges only the items contained in the incrementalItems array. | ( |
canHideSubordinates | Whether the subordinates of the given item are visible. | ( |
canHideSuperior | Whether the superior of the given item is visible. | ( |
canShowAll | Whether there are any hidden organization chart items to show. | () => boolean |
canShowSubordinates | Whether the subordinates of the given item are hidden. | ( |
canShowSuperior | Whether the superior of the given item is hidden. | ( |
exportToPng | Exports the organization chart to a PNG Image. @throws Exception if the diagram cannot be exported. The exception may occur when the diagram contains images from cross-origin sources. In this case, disable ExportSettings.inlineImages and encode the icons manually to base64. | ( |
exportToSvg | Exports the organization chart to an SVG file. @throws Exception if the diagram cannot be exported. The exception may occur when the diagram contains images from cross-origin sources. In this case, disable ExportSettings.inlineImages and encode the icons manually to base64. | ( |
fitContent | Fits the organization chart inside the viewport. | () => void |
getSearchHits | Retrieves the items that match the search currently. | () => OrgChartItem[] |
getVisibleItems | Returns the currently visible items of the organization chart. | () => OrgChartItem[] |
graphComponent | The yFiles GraphComponent used by the OrgChart component to display the graph. This property is intended for advanced users who have a familiarity with the yFiles for HTML library. | GraphComponent |
hideSubordinates | Hides the subordinates of the given item. | ( |
hideSuperior | Hides the superior of the given item. | ( |
print | Exports and prints the organization chart. | ( |
refresh | Triggers a re-rendering of the chart. This may become useful if properties in the data change and the visualization should update accordingly. | () => void |
removeGraphUpdatedListener | Removes a listener added in OrgChartModel.addGraphUpdatedListener. | ( |
showAll | Shows all items in the organization chart. | () => Promise<void> |
showSubordinates | Shows the subordinates of the given item. | ( |
showSuperior | Shows the superior of the given item. | ( |
zoomIn | Increases the zoom level. | () => void |
zoomOut | Decreases the zoom level. | () => void |
zoomTo | Pans the viewport to the center of the given items. | ( |
zoomToItem | Pans the viewport to center the given item. | ( |
zoomToOriginal | Resets the zoom level to 1. | () => void |