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
Name | Type | Default | Description |
---|---|---|---|
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
Name | Type | Default | Description |
---|---|---|---|
color? | | ((item: T) => ) | - | Color to apply to the layer |
LegendColorLayerProps
Name | Type | Default | Description |
---|---|---|---|
color | - | When the color prop is set to 'legend', a value accessor is needed | |
valueAccessor | - | The value accesor to map data point values to legend color |
Tooltip
ChoroplethLayerTooltipData
Name | Type | Default | Description |
---|---|---|---|
color | - | The hovered region color | |
name | - | The hovered region name | |
data | T | - | The hovered region custom data |
ChoroplethLayerTooltipHandler
Signature:
export declare type ChoroplethLayerTooltipHandler = (regionData: ) => .;
ChoroplethLayerTooltipHandlerProps
Name | Type | Default | Description |
---|---|---|---|
children? | | | - | The ChoroplethLayer tooltip handler template |