Skip to main content

ChoroplethLayer

The ChoroplethLayer component allows users to display divided geographical areas or regions that are coloured in relation to a given data. It provides an easy way to visualize how a variable varies across a geographic area or show the level of variability within a region.

ChoroplethLayer

ChoroplethLayerProps

Signature:

export declare type ChoroplethLayerProps<T extends <, >> = <T> & (<T> | );

ChoroplethLayerBaseProps

extends
NameTypeDefaultDescription
data
T[]

An array of data items representing regions to be displayed in the ChoroplethLayer

regionAccessor
| ((t: T) => )

A string property or accessor function that specifies how to access the region identifier from the data items. It can be a string representing the key in the data object or a function that extracts the region identifier

ChoroplethCustomColorProps

NameTypeDefaultDescription
color?
| ((item: T) => )

Color to apply to the layer

LegendColorLayerProps

NameTypeDefaultDescription
color

When the color prop is set to 'legend', a value accessor is needed

valueAccessor

The value accessor to map data point values to legend color

Tooltip

ChoroplethLayerTooltipData

NameTypeDefaultDescription
color

The hovered region color

name

The hovered region name

data
T

The hovered region custom data

seriesActions?
(data: <T>) =>

Series actions callback for the default tooltip

ChoroplethLayerTooltipHandler

Signature:

export declare type ChoroplethLayerTooltipHandler = (regionData: ) => ;

ChoroplethLayerTooltipHandlerProps

NameTypeDefaultDescription
children?
|

The ChoroplethLayer tooltip handler template

seriesActions?
(data: ) =>

Series actions callback for the default tooltip

hidden?

Whether the tooltip is hidden

symbolAlignment?
|

Overrides the horizontal alignment of series symbols

Still have questions?
Find answers in the Dynatrace Community