eurostat-map
    Preparing search index...

    Interface PatternFillConfig

    Configuration for a single fill pattern overlay applied to specific regions. Pass an array of these to map.patternFill([...]) to hatch/dot/cross-hatch specific regions on top of their normal fill (e.g. to flag missing/estimated data).

    interface PatternFillConfig {
        pattern?: "hatching" | "crosshatch" | "dots" | string & {};
        regionIds?: string[];
        color?: string;
        strokeWidth?: number;
        spacing?: number;
        customPattern?: string;
        legendLabel?: string;
        patternId?: string;
    }
    Index

    Properties

    pattern?: "hatching" | "crosshatch" | "dots" | string & {}

    Built-in pattern name, or any string when using a customPattern with a matching id.

    'hatching'
    
    regionIds?: string[]

    Region IDs to apply this pattern to.

    color?: string

    Stroke/dot color for the pattern.

    '#000'
    
    strokeWidth?: number

    Stroke width (hatching/crosshatch) or dot radius (dots).

    1
    
    spacing?: number

    Distance between repeated pattern elements in pixels.

    8
    
    customPattern?: string

    Raw SVG markup for a custom <pattern> element, used instead of a built-in pattern. Must include an id attribute; that id is then used to reference the pattern.

    '<pattern id="my-pattern" ...>...</pattern>'
    
    legendLabel?: string

    Label shown for this pattern in the legend. Patterns without a label are omitted from the legend.

    patternId?: string

    Internal: resolved pattern element id, set automatically.