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

    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

    ChoroplethLayerTooltipHandler

    Signature:

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

    ChoroplethLayerTooltipHandlerProps

    NameTypeDefaultDescription
    children?
    |
    -

    The ChoroplethLayer tooltip handler template

    Still have questions?
    Find answers in the Dynatrace Community