ZoomCharts Documentation

Version: 1.21.1 (2024-11-08)

NetChart.settings

This section is defined by the type NetChartSettings.

Properties

Inherited from: BaseSettings
View section details

Chart area related settings.

assetsUrlBase: string
Default value: ""
Inherited from: BaseSettings

The URL root where the ZoomCharts library and assets are located. For example, if the base.css file is available at 'http://server/css/zoomcharts/zc.css' then this value should be set to 'http://server/css/zoomcharts/'. Note that the library will try to determine its location automatically by searching the included script tags. So this property can be skipped if the assets folder is located next to 'zoomcharts.js' file on the server.

Introduced in version 1.15.0.
View section details

Contains settings for the auras drawn beneath the nodes.

container: string | HTMLElement
Default value: null
Inherited from: BaseSettings

Element of the page where the chart will be inserted. Any HTML element should work, for example you can use a <div>.

Any contents of the element will be cleared - this behavior can be used to specify a loading message as the initial content, for example <div>Chart is being initialized...</div>.

Note that a single element can host only one chart. If the same container is given to another chart, the previous chart will be automatically disposed.

Unless parentChart is specified, the value of the property is mandatory and can only be specified while creating the chart, not with updateSettings. The value can be either an ID of an existing element or a reference to a DOM element.

Inherited from: BaseSettings
View section details

Settings for displaying chart credits. Use it as a reference to additional data sources if necessery.

Chart including credits

Note that even if credits enabled on page load, it's possible to hide on exported images.

Default value: [ { "id": "default", "url": null, "urlParameters": [], "postprocessorFunction": null, "preloaded": null, "format": "JSON", "requestTimeout": 40000, "numberOfParallelRequests": 3, "cacheSize": 10000, "random": null, "randomGridLinkProbability": 0.6, "randomNodes": 0, "randomLinks": 0, "randomTreeDensity": 3, "requestMaxUnits": 2, "dataFunction": null } ]
Inherited from: BaseSettings
View section details

Settings used to load data into chart. Customise preferred data source feeding methods. You can use one of these options: url, data function, preloaded data.

Inherited from: BaseSettings
View section details

The events used to handle user interaction with UI elements.

Configurable conditions to filter the raw data values for subset of drawing nodes and links.

Properties
linkFilter: (linkData: NetChartDataObjectLink, fromNodeData: NetChartDataObjectNode, toNodeData: NetChartDataObjectNode) => boolean
Default value: null

Determine if link can be displayed. Invoked whenever a link is about to be shown or its data has changed. Only links that have been allowed by nodeFilter for both end nodes will be passed here.

Parameters

link data object

data object representing node where the link begins

data object representing node where the link ends

Return value
Data type: boolean

true if the link should be shown, false otherwise

Default value: null

Function called whenever there is more than one link between two nodes. Only links that were allowed by nodeFilter, linkFilter and nodeLinksProcessor will be passed here. The function can return either some of the original links, or create completely new links. In the latter case, link IDs MUST be unique (links passed in are guaranteed to have unique IDs).

Parameters
arrayOfLinkData: Array<NetChartDataObjectLink>

array of link data objects

data object representing node where the links begins

data object representing node where the links ends

Return value

One or more links to be used in place of the original links

nodeFilter: (nodeData: NetChartDataObjectNode, arrayOfLinkData: Array<NetChartDataObjectLink>) => boolean
Default value: null

Determine if node can be displayed. Invoked whenever a node or one of its links is about to be shown, or if data for the node (or its links) has changed.

Parameters

Node data object

arrayOfLinkData: Array<NetChartDataObjectLink>

Unfiltered array of link data objects (linkFilter/nodeLinksProcessor/multilinkProcessor have not been applied)

Return value
Data type: boolean

true if the node should be shown, false otherwise

Default value: null

From links that were allowed by nodeFilter and linkFilter, select the ones that will be displayed. This is basically a bulk version of linkFilter. It is also allowed to return a completely new set of links, however link IDs MUST be unique in this case (links passed in are guaranteed to have unique IDs).

Parameters

Node data object

Return value

Array of links to show.

Inherited from: ItemsChartSettings

Info popup for item - meaning links or nodes - with configurable content rendered.

Properties
enabled: boolean
Default value: false

Show/hide info popup

linkContentsFunction: (linkData: ItemsChartDataObjectLink, link: ItemsChartLink, asyncCallback: (contents: string | HTMLElement) => void) => string | HTMLElement
Default value: null

Returns html string to display in passed links info popup.

Parameters

link data

asyncCallback: (contents: string | HTMLElement) => void

callback function

Parameters
contents: string | string | HTMLElement
Return value
Data type: string | string | HTMLElement

a HTML string to display in info popup.

nodeContentsFunction: (nodeData: ItemsChartDataObjectNode, node: ItemsChartNode, callback: (contents: string | HTMLElement) => void) => string | HTMLElement
Default value: null

Returns html string to display in passed nodes info popup.

Parameters

node data

node object

callback: (contents: string | HTMLElement) => void

callback function

Parameters
contents: string | string | HTMLElement
Return value
Data type: string | string | HTMLElement

a HTML string to display in info popup.

showDelay: number
Default value: 0

Delay before showing the popup

showLabelByDefault: boolean
Default value: true

Whether to show a label if no contents function has been provided

Inherited from: BaseSettings
View section details

Customise chart resize handles or animation duration settings.

View section details

Adjustable settings to get desired net chart layout style and animation while and before interacting.

Inherited from: BaseSettings
View section details

The chart legend representing classes attached to nodes or links. The legend will display the visual styles specified in style.nodeClasses and style.linkClasses - by default these are not defined so the legend will be empty.

Inherited from: ItemsChartSettings
View section details

Configurable link menu with option to specify a range of displaying buttons.

Inherited from: BaseSettings
View section details

Localizeable strings including export type options and useful default buttons used for chart interaction. Buttons like to navigate back, set the chart on full screen and others.

View section details

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.

Inherited from: ItemsChartSettings
View section details

Configurable node menu with option to specify a range of displaying buttons.

parentChart: BaseApi
Inherited from: BaseSettings

The parent chart within which the new chart will be rendered. If this property is specified, container cannot be specified.

Use area.left, area.top, area.width and area.height settings to position the subchart within parent chart.

See also
Inherited from: ItemsChartSettings
View section details

Chart style settings.

See also
Default value: { "advanced": { "themeCSSClass": "DVSL-flat" } }
Inherited from: BaseSettings

Theme to apply. You can either use this to share configuration objects between multiple charts or use one of the predefined themes.

See also
Inherited from: BaseSettings
View section details

The chart's main title.

Inherited from: BaseSettings
View section details

Adjustable settings to manage default and custom toolbar items, as well as toolbar overall appearance.

X