CompanyOwnershipModel

The CompanyOwnershipModel provides common functionality to interact with the CompanyOwnership component.

Props

NameDescriptionType
addGraphUpdatedListener
Adds a listener called whenever companies are shown or hidden.
(
listener: () => void
) => void
applyLayout
Refreshes the company ownership 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.
(
incremental: boolean,
incrementalItems: Entity[],
fixedItem: Entity,
fitViewport: boolean
) => Promise<void>
canClearConnectedItemsHighlight
Whether there is currently a connected items highlight visualized in the graph that can be cleared.
() => boolean
canHidePredecessors
Whether the predecessors of the given item is visible.
(
item: Entity
) => boolean
canHideSuccessors
Whether the successors of the given item are visible.
(
item: Entity
) => boolean
canShowAll
Whether there are any hidden items to show.
() => boolean
canShowPredecessors
Whether the predecessors of the given item is hidden.
(
item: Entity
) => boolean
canShowSuccessors
Whether the successors of the given item are hidden.
(
item: Entity
) => boolean
clearConnectedItemsHighlight
Clears the connected items highlight visualization.
() => void
exportToPng
Exports the company ownership 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.
(
exportSettings: ExportSettings
) => Promise<void>
exportToSvg
Exports the company ownership 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.
(
exportSettings: ExportSettings
) => Promise<void>
fitContent
Fits the chart inside the viewport.
(insets: number) => void
getSearchHits
Retrieves the items that match the search currently.
() => Entity[]
getVisibleItems
Returns the currently visible items of the company ownership chart.
() => Entity[]
graphComponent
The yFiles GraphComponent used by the CompanyOwnership component to display the graph. This property is intended for advanced users who have a familiarity with the yFiles for HTML library.
GraphComponent
hidePredecessors
Hides the predecessors of the given item.
(
item: Entity
) => Promise<void>
hideSuccessors
Hides the successors of the given item.
(
item: Entity
) => Promise<void>
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.
(
item: Entity
) => void
isConnection
Whether the item is a connection.
(
item: any
) => item is Connection
print
Exports and prints the company ownership chart.
(
printSettings: PrintSettings
) => Promise<void>
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 CompanyOwnershipModel.addGraphUpdatedListener.
(
listener: () => void
) => void
showAll
Shows all items in the company ownership.
() => void
showGenealogy
Filters the graph for all items that are connected to the given item. Connections can be over multiple hops.
(
item: Entity
) => void
showPredecessors
Shows the predecessors of the given item.
(
item: Entity
) => Promise<void>
showSuccessors
Shows the successors of the given item.
(
item: Entity
) => Promise<void>
zoomIn
Increases the zoom level.
() => void
zoomOut
Decreases the zoom level.
() => void
zoomTo
Pans the viewport to the center of the given items.
(
items: (
| Entity
| Connection
)[]
) => void
zoomToOriginal
Resets the zoom level to 1.
() => void