SupplyChainModel
The SupplyChainModel provides common functionality to interact with the SupplyChain component.
Props
Name | Description | Type |
---|---|---|
applyLayout | Refreshes the supply chain 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. | ( |
canClearConnectedItemsHighlight | Whether there is currently a connected items highlight visualized in the graph that can be cleared. | () => boolean |
canCollapseItem | Whether an item can be collapsed. An item can be collapsed when it is a grouping item, and it is in the expanded state. | ( |
canExpandItem | Whether an item can be expanded. An item can be expanded when it is a grouping item, and it is in the collapsed state. | ( |
canShowAll | Whether there are any hidden items to show. | () => boolean |
clearConnectedItemsHighlight | Clears the connected items highlight visualization. | () => void |
collapseItem | Collapses an item and all it’s children recursively. | ( |
expandItem | Expands an item and all it’s children recursively. | ( |
exportToPng | Exports the supply chain 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 supply chain 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. | ( |
filterForConnectedItems | Filters the graph for all items that are connected to the given item. In contrast to SupplyChainModel.showGenealogy, this method does not clear the filtering state before calculating the genealogy and thus allows for a drill-down in the currently displayed filtered state. | ( |
fitContent | Fits the chart inside the viewport. | (insets: number) => void |
getChildren | Returns all children of an item recursively. | ( |
getSearchHits | Retrieves the items that match the search currently. | () => SupplyChainItem[] |
graphComponent | The yFiles GraphComponent used by the SupplyChain component to display the graph. This property is intended for advanced users who have a familiarity with the yFiles for HTML library. | GraphComponent |
highlightConnectedItems | Highlights an item and all other items connected to it. Two items are connected when there exists an edge path between them, even if there are several hops (items) on the path. | ( |
isConnection | Whether the item is a connection. | ( |
isFoldingConnection | Whether a connection groups multiple “simple” connections. See FoldingConnection. | ( |
isGroupItem | Whether the item can have children. | ( |
print | Exports and prints the supply chain 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 |
showAll | Shows all items in the supply chain. | () => void |
showGenealogy | Filters the graph for all items that are connected to the given item. Connections can be over multiple hops. | ( |
showLevel | Expands/collapses the graph to the given level. The top level is 1. | (level: number) => void |
toggleExpansionState | Toggles the expansion state of a grouping item. | ( |
zoomIn | Increases the zoom level. | () => void |
zoomOut | Decreases the zoom level. | () => void |
zoomTo | Pans the viewport to the center of the given items. | ( |
zoomToOriginal | Resets the zoom level to 1. | () => void |