ZoomCharts Documentation

NetChart.settings.navigation

This section is defined by the type NetChartSettingsNavigation.

Settings for NetChart navigation (expanding/collapsing/focusing/unfocusing/showing/hiding). The main setting is "mode" which determines the overall algorithm for navigation. Other parameters can tweak this algorithm, but not all parameters apply to all algorithms.

Properties

autoUnfocus: boolean
Default value: true
Introduced in version 1.10.0.

Determines what happens if the user has reached maximum number of focus nodes (numberOfFocusNodes) and focuses another node. In focusnode mode, if this setting is true, then the least recently focused node will be unfocused; if this setting is false, then the userwill not be able to focus the node. In manual and showall modes, numberOfFocusNodes is not taken into account. If true then by focusing a different node, the previous becomes unfocused. If 'false' then previous nodes remain focused. Used by modes: all modes

autoZoomOnFocus: boolean
Default value: false

Whether to auto-zoom to a node when it is focused. Used by modes: all modes

defaultExpandDepth: number
Default value: 0

How many levels deep a node expand has if not specified. Only applies in focus node navigation mode.

defaultExpandMode: "both" | "from" | "to"
Default value: "both"

Which nodes to expand. Only applies in focus node navigation mode.

Valid values:
  • both - Expand all links
  • from - Expand only 'from' links
  • to - Expand only 'to' links
expandDelay: number
Default value: 0

If focusing a node would display several levels of nodes (due to focusNodeExpansionRadius or focusNodeTailExpansionRadius), each level is shown after the specified delay (milliseconds). Set to 0 to disable. Used by modes: focusnodes

expandOnClick: boolean
Default value: true

Whether to expand node on click. Used by modes: all modes

focusAutoFadeout: boolean
Default value: false
Introduced in version 1.10.0.

If set to true, nodes and links with relevance < 1 will be drawn with a smaller radius and a faded out color (both multiplied by relevance). Used by modes: focusnodes

See also
focusNodeExpansionRadius: number
Default value: 2

Number of "levels" to automatically expand around the most recently focused node. If set to 1, all nodes directly linked to the focused node will be shown. If set to 2, all nodes directly connected to these nodes will be shown as well. Etc. Also used for calculating node relevance. Used by modes: focusnodes

See also
focusNodeTailExpansionRadius: number
Default value: null
Version 1.10.0: the default value changed from 0.3 to 2.
Version 1.11.4: the default value changed from 2 to null which means "the same as focusNodeExpansionRadius.

Similar to focusNodeExpansionRadius, but for the least recently focused node. This allows to create an effect, where the most recently focused node has many expanded nodes around it, while the least recently node has only a few (or vice versa). Intermediate focused nodes will have their expansion radius linearly interpolated between focusNodeExpansionRadius and focusNodeTailExpansionRadius. Also used to calculate node relevance. Used by modes: focusnodes

See also
initialFocusNodeExpansionRadius: number
Default value: null

The focus node expansion radius used on chart load and reset.

initialNodes: Array<string>
Default value: null

Initially visible/focused nodes. Array of node identifiers. The precise effect depends on the navigation mode.

  • For manual this specifies the initially visible nodes and must contain at least 1 node.
  • For showall this specifies which nodes to show first, and other nodes are then requested recursively from these until all nodes are visible.
  • If this setting is left empty or null, the chart will directly request ALL nodes (this is more efficient if your data source supports it).
  • For focusnodes this specifies the initially focused nodes. The count of node IDs in this array must be between minNumberOfFocusNodes and numberOfFocusNodes

Used by modes: all modes

minNumberOfFocusNodes: number
Default value: 1

Minimum number of focused nodes. Prevents user from unfocusing nodes if there are minNumberOfFocusNodes or less nodes focused. If the focusnodes navigation is used, this setting has a minimum value of 1. Used by modes: all modes

mode: "manual" | "showall" | "focusnodes"
Default value: "showall"

Navigation mode - the algorithm that determines the expanding/collapsing logic.

Valid values:
  • manual - Fully manual mode. At the start, only the nodes mentioned in initialNodes will be shown. Other nodes can be shown by expanding the initial nodes. Collapsing hides the collapsed node and all surrounding nodes, except for the very last visible node. Focusing/unfocusing nodes changes the node status, but does not do anything else. Node relevance is not used.
  • showall - The same as manual, but automatically shows ALL nodes at the start. CAUTION - if the network is large this will bring down the chart! If initialNodes contains any nodes, then additional nodes will be requested recursively starting from these. If initialNodes is null or empty, all nodes will be requested at the start.
  • focusnodes - Algorithm for exploring the graph by "walking" through it. Focusing a node expands surrounding nodes and unfocusing a node collapses them. Only nodes that are connected to a focused node are shown. Collapsing a node only hides nodes which are further away from a focus node. Node relevances are calculated.
numberOfFocusNodes: number
Default value: 3

Maximum number of focused nodes. The autoUnfocus setting determines what happens when more nodes are focused. Used by modes: focusnodes

X