Maps

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
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe 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
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe 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
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe 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
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe 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
idStringRepresents the unique id assigned to the chart <div> element, e.g., 'myChart'.
shapeidStringThe name of the map item.
shapeindexNumberThe index number of the map item.
On This Page