All docs
V24.1
24.2
24.1
23.2
23.1
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
The page you are viewing does not exist in version 19.2.
19.1
The page you are viewing does not exist in version 19.1.
18.2
The page you are viewing does not exist in version 18.2.
18.1
The page you are viewing does not exist in version 18.1.
17.2
The page you are viewing does not exist in version 17.2.

JavaScript/jQuery VectorMap - Legend

Configures map legends.

import { Legend } from "devextreme/viz/vector_map"

customizeHint

Specifies text for a hint that appears when a user hovers the mouse pointer over the text of a legend item.

Type:

Function

Function parameters:
itemInfo:

Object

Information on a legend item.

Object structure:
Name Type Description
color

String

The legend item's color. This field is undefined if the source is 'markerSizeGroups'.

end

Number

The end value of the group indicated by the legend item.

index

Number

The group's index.

size

Number

The diameter of the legend item in pixels. This field is undefined if the source is 'areaColorGroups' or 'markerColorGroups'.

start

Number

The start value of the group indicated by the legend item.

Return Value:

String

The text for the hint to display.

Cannot be used in themes.

customizeItems

Allows you to change the order and visibility of legend items.

Type:

Function

Function parameters:

Legend items before customizations.

Return Value:

Array<VectorMapLegendItem>

Legend items after customizations.

customizeText

Specifies text for legend items.

Type:

Function

Function parameters:
itemInfo:

Object

Information on a legend item.

Object structure:
Name Type Description
color

String

The legend item's color. This field is undefined if the source is 'markerSizeGroups'.

end

Number

The end value of the group indicated by the legend item.

index

Number

The group's index.

size

Number

The diameter of the legend item in pixels. This field is undefined if the source is 'areaColorGroups' or 'markerColorGroups'.

start

Number

The start value of the group indicated by the legend item.

Return Value:

String

The text for the legend item to display.

Cannot be used in themes.

markerColor

Specifies the color of item markers in the legend. The specified color applied only when the legend uses 'size' source.

Type:

String

Default Value: undefined

markerShape

Specifies the shape of item markers.

Default Value: 'square'

markerSize

Specifies the marker's size in a legend item in pixels.

Type:

Number

Default Value: 12

markerTemplate

Specifies an SVG element that serves as a custom legend item marker.

Type:

template

Template Data:

VectorMapLegendItem

Information about a legend item.

Default Name: undefined