ZoomCharts Documentation

Version: 1.21.1 (2024-11-08)

NetChart.settings.legend

This section is defined by the type NetChartSettingsLegend.

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.

Properties

Inherited from: BaseSettingsLegend
View section details

Advanced settings which may change in the future.

displayMode: string
Default value: "grid"
Inherited from: BaseSettingsLegend

How legend items are arranged.

In grid mode, all entries have a fixed width and height and displayed based on how much of the entry grid is possible

In inline mode, entry width and height is based on item width and height and items are displayed one after the other until all available legend space is filled

enabled: boolean
Default value: false
Inherited from: BaseSettingsLegend

Show/hide chart legend.

equalizeRowsColumns: boolean
Default value: true
Inherited from: BaseSettingsLegend

Whether to order entries to get possibly equal number of items into columns or rows. If false, once the row or column is full of entries, the next element will be first in the new row or column/rows.

height: number
Default value: null
Inherited from: BaseSettingsLegend

Maximum height of the legend. If null, all available vertical space of chart will be consumed to set as much entries as possible. It coincides with the chart height if legend panel side is on a left or right.

Inherited from: BaseSettingsLegend
Introduced in version 1.14.0.
View section details

Settings related to the user interaction with the legend.

lineSpacing: number
Default value: 0.2
Inherited from: BaseSettingsLegend

Vertical space between the lines of text.

margin: number
Default value: 1
Inherited from: BaseSettingsLegend

Margin around each legend entry.

Inherited from: BaseSettingsLegend
View section details

Visual element of legend entry with appropriate style to a slice color it corresponds. The content of each legend marker is the same as info popup appearing while hovering on slice.

maxLineSymbols: number
Default value: 15
Inherited from: BaseSettingsLegend

Max number of symbols used in one line of text that applies to any legend entry.

minHeight: number
Default value: null
Inherited from: BaseSettingsLegend

Minium height of the legend.

minWidth: number
Default value: null
Inherited from: BaseSettingsLegend

Minium width of the legend.

mode: "hide" | "highlight"
Default value: "hide"
numberOfColumns: number
Default value: null
Inherited from: BaseSettingsLegend

Max number of columns. Use in conjunction with side parameter under the legend panel should be right or left in order to arrange entries by columns.

numberOfRows: number
Default value: null
Inherited from: BaseSettingsLegend

Max number of rows. Use in conjunction with side parameter under the legend panel that should be set as bottom or top in order to arrange entries by rows.

padding: number
Default value: 15
Inherited from: BaseSettingsLegend

Padding around each entry text and marker.

pageScrollAnimationTime: number
Default value: 0.8
Inherited from: BaseSettingsLegend

How long (in seconds) it should take for a legend page to scroll to the next location

Inherited from: BaseSettingsLegend
View section details

Legend enclosing panel settings.

shouldForceWrapLongText: boolean
Default value: false
Inherited from: BaseSettingsLegend

Whether to automatically wrap legend text if any word is too long to fit in the legend entry

shouldHideLongText: boolean
Default value: false
Inherited from: BaseSettingsLegend

Whether to hide legend text that is too long to fit in an entry

Inherited from: BaseSettingsLegend
View section details

Text settings displaying in legend entries.

width: number
Default value: null
Inherited from: BaseSettingsLegend

Maximum width of the legend. If null, all available horizontal space of chart will be consumed to set as much entries as possible. It coincides with the chart width if legend panel side is on a top or bottom.

X