All docs
V19.2
24.2
The page you are viewing does not exist in version 24.2.
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 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
19.1
18.2
18.1
17.2
Box
Map
Vue
A newer version of this page is available. Switch to the current version.

JavaScript/jQuery VectorMap - legends.source

Specifies the source of data for the legend.

Type:

Object

Cannot be used in themes.

grouping

Specifies the type of the legend grouping.

Type:

String

Cannot be used in themes.

The VectorMap's legend supports three grouping types.

  • color
    Can be used if you have grouped map markers or areas in several differently-colored groups. For more information, refer to the layers's colorGroupingField and colorGroups option descriptions.

  • size
    Available for markers of a bubble type only. Can be used if you have grouped bubble markers in several groups and specified a size for bubbles in each group. For more information, refer to the sizeGroupingField and sizeGroups option descriptions.

View Demo

layer

Specifies a layer to which the legend belongs.

Type:

String

Cannot be used in themes.

Pass a layer name to this option.