YFilesView

Label: :IA_Function
Property: type: YFilesView
Inherits from: Function and View

The YFilesView Function renders a visualisation of a graph using yFiles diagramming components.

Parameters

Key Description Default value Possible values
autoCompleteStatus Automatically retrieves missing relations between nodes. false true|false 0|1
addAutoFilters Checks the "Add filters automatically" checkbox when filters clicked. true true|false 0|1
canChangeRelationEnds Enables the possibility to drag one of the relationship's end to another node. This will trigger a relationTargetChanged or relationSourceChanged event false true|false 0|1
canSetLayout Displays the button to change layout. true true|false 0|1
canSwitchZoomToFitStatus Displays the button to switch zoom-to-fit status. true true|false 0|1
canSwitchAutoCompleteStatus Displays the button to switch autocomplete. true true|false 0|1
canSetFilters Displays the button to set filters. true true|false 0|1
canSetStyles Displays the button to set styles. true true|false 0|1
canSwitchSelectionStatus Displays the button to toggle selection mode. true true|false 0|1
canSwitchOverviewStatus Displays the button to switch showing overview status. true true|false 0|1
container.height Sets the view height. 1000 Numeric
container.width Sets the view width. 500 Numeric
explorable Double-clicking a node will load its neighbours in the view. true true|false
filters An object of name-filter pairs. filters object
filterProperty A property on the node root that will reflect the node's filter state. Default visible property affects visibility. Other properties can be used e.g. for styling. visible string
generateGroups Simplified parameter for creating groups.* [] Object with, for each key, an array of node objects
groups Array of groups to be visualized. [] Array of group objects
layout Sets the node layout. organic organic, hierarchic, tree, orthogonal, circular, radial, seriesparallel, partial, singlecycle, recursiveshuffle, compactorthogonal, balloon, classictree, aspectratiotree
layouts Sets the list of the usable layouts. undefined organic, hierarchic, tree, orthogonal, circular, radial, seriesparallel, partial, singlecycle, recursiveshuffle, compactorthogonal, balloon, classictree, aspectratiotree
name Name of the view.
nodes The array of nodes to be visualized. [] Array of node objects
relations The array of relations to be visualized. [] Array of relation objects
showOverview Displays overview box false true false
store Sets the default store for the YFilesView. application name of configured store
state.selected.nodes Array of nodes that is selected. [] Array of node objects
state.selected.relations Array of relations that is selected. [] Array of relation objects
styles Object with selector-styling pairs applicable only to this YFilesView. Styles object
selectionMode Determines how nodes and relations can be selected, either by dragging a rectangular marquee, a free-form lasso, or only direct clicks on individual nodes. Selection by direct click is always enabled. marquee marquee, lasso, individual
toolbarVisible Displays the buttons of yFiles View toolbar. true true|false 0|1

* The generateGroups parameter will generate group objects that will be set in groups. It is write-only, updated groups from groups will not appear in generateGroups.

Styles

YFilesView nodes, relations and groups can be styled in 3 ways:

1. User's styles

By default, the UserStyles of the currently logged in user will be applied to YFilesView.

2. UserStyles connected to YFilesView

The user's own styles can be replaced by UserStyles connected directly to the YFilesView with a USES relation:

(:IA_Function{type:YFilesView})-[:USES]->(:IA_UserStyles)

Any number of UserStyles can be connected to the YFilesView. They will be applied in order of the optional index property on the USES relation (no index is equivalent to index: 0). Styles with higher indexes will be applied later, overriding those with lower indexes.

Once a single UserStyles node is connected to the YFilesView, the user's own styles will no longer be applied.

3. YFilesView styles parameter

Finally, specific styles can be overridden using the styles parameter on the YFilesView. Styles from either the user (1) or connected UserStyles (2) will still be applied before. Styles defined in the styles will override other styles matching the same nodes/relations/groups.

Outgoing triggers

Type: nodeClick

Occurrence: When the user clicks a node.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The clicked node. node object
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: nodeDoubleClick

Occurrence: When the user double-clicks a node.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The double-clicked node. node object
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: relationClick

Occurrence: When the user clicks a relation.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The clicked relation relation object
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: relationDoubleClick

Occurrence: When the user double-clicks a relation.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The double-clicked relation. relation object
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: groupClick

Occurrence: When the user clicks a group.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The clicked group. group object
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: groupDoubleClick

Occurrence: When the user doulb-clicks a group.

Additional event properties (besides the inherited properties):

Key Description Possible values
data The double-clicked group. group object
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: canvasClick

Occurrence: When the user clicks an empty space in the graph.

Additional event properties (besides the inherited properties):

Key Description Possible values
position The clicked position object {x: number, y: number}
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: canvasDoubleClick

Occurrence: When the user double-clicks an empty space in the graph.

Additional event properties (besides the inherited properties):

Key Description Possible values
position The double-clicked position object {x: number, y: number}
keyPressed Map of keys that are pressed during the click. object
keyPressed.ctrl Control button pressed during click. true|false
keyPressed.shift Shift button pressed during click. true|false
keyPressed.meta Meta button (Apple Command or Windows button) pressed during click true|false

Type: link

Occurrence: When the user links one node to another (by dragging).

Additional event properties (besides the inherited properties):

Key Description Possible values
from The node the link starts from. node object
to The node the link ends at. node object

Type: relationSourceChange

Occurrence: When the user drags a relation source to another node.

Additional event properties (besides the inherited properties):

Key Description Possible values
relation The dragged relation relation object
newSource The new source node node object


Type: relationTargetChanged

Occurrence: When the user drags a relation target to another node.

Additional event properties (besides the inherited properties):

Key Description Possible values
relation The dragged relation relation object
newTarget The new target node node object

Type: context

The following context menus are available from the YFilesView:

Menu Occurs when Target value
node User right-clicks a node Right-clicked node object
relation User right-clicks a relation Right-clicked relation object
canvas User right-clicks an empty space Position object {x: number, y: number}

More info on context menus.