eurostat-map
    Preparing search index...

    Interface TooltipConfig

    Configuration for tooltips

    interface TooltipConfig {
        textFunction?: (region: any, map: MapInstance) => string;
        omitRegions?: string[];
        decimals?: number;
        showFlags?: boolean | "short";
        containerId?: string;
        id?: string;
        offset?: { x?: number; y?: number };
        xOffset?: number;
        yOffset?: number;
        opacity?: number;
        [key: string]: any;
    }

    Indexable

    • [key: string]: any
    Index

    Properties

    textFunction?: (region: any, map: MapInstance) => string

    Custom tooltip text/HTML builder, called with the hovered region/symbol datum and the map instance.

    (region, map) => `<b>${region.properties.na}</b>`
    
    omitRegions?: string[]

    Region IDs to skip showing/updating the tooltip for.

    decimals?: number

    Fixed decimal places for the tooltip's displayed value (choropleth maps). Preserves trailing zeros (e.g. 7 -> "7.0") that the default formatter otherwise drops. Defaults to the max precision seen across the stat dataset's own values when unset.

    showFlags?: boolean | "short"

    Show status flags (e.g. estimated/provisional) next to the value. Pass 'short' for the raw flag code instead of the expanded label.

    false
    
    containerId?: string

    Id of the container element used to constrain the tooltip's position/bounds.

    the map's containerId, or svgId, or 'map'
    
    id?: string

    Id of the tooltip's own <div> element.

    em-tooltip-${containerId}

    offset?: { x?: number; y?: number }

    Pixel offset {x, y} of the tooltip from the pointer. Takes precedence over xOffset/yOffset.

    xOffset?: number

    X pixel offset of the tooltip from the pointer, used when offset.x is unset.

    30
    
    yOffset?: number

    Y pixel offset of the tooltip from the pointer, used when offset.y is unset.

    20
    
    opacity?: number

    Opacity of the tooltip when shown.

    1