Map Events

ZingChart maps are based on ZingChart shapes, which means you can use shape-related ZingChart events to extend the interactivity of your maps.

shape_click

This event fires when the user clicks on a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription

id

String

Represents the unique id assigned to the chart <div> element, e.g., 'myChart'.

shapeid

String

The name of the map item.

shapeindex

Number

The index number of the map item.

shape_dblclick

This event fires when the user double-clicks on a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription

id

String

Represents the unique id assigned to the chart <div> element, e.g., 'myChart'.

shapeid

String

The name of the map item.

shapeindex

Number

The index number of the map item.

shape_mousemove

This event fires whenever the user moves the mouse over a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription

id

String

Represents the unique id assigned to the chart <div> element, e.g., 'myChart'.

shapeid

String

The name of the map item.

shapeindex

Number

The index number of the map item.

shape_mouseout

This event fires when the user mouses out of a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription

id

String

Represents the unique id assigned to the chart <div> element, e.g., 'myChart'.

shapeid

String

The name of the map item.

shapeindex

Number

The index number of the map item.

shape_mouseover

This event fires when the user mouses over a shape.

It executes a handler function that includes the following parameters:

ParameterTypeDescription

id

String

Represents the unique id assigned to the chart <div> element, e.g., 'myChart'.

shapeid

String

The name of the map item.

shapeindex

Number

The index number of the map item.