eurostat-map
    Preparing search index...

    Interface LegendConfig

    Parent configuration for map legends. Each map type will extend this with its own specific properties, but these are the common ones that apply to all legend types.

    interface LegendConfig {
        x?: number;
        y?: number;
        width?: number;
        height?: number;
        title?: string;
        subtitle?: string;
        titleFontSize?: number;
        boxPadding?: number;
        boxOpacity?: number;
        titlePadding?: number;
        shapeWidth?: number;
        shapeHeight?: number;
        shapePadding?: number;
        sepLineLength?: number;
        labelFontSize?: number;
        labelOffsets?: { x: number; y: number };
        labelFormatter?: (value: number, index?: number) => string;
        decimals?: number;
        orientation?: "vertical" | "horizontal";
        ascending?: boolean;
        noData?: boolean;
        noDataText?: string;
        noDataPadding?: number;
        noDataShapeWidth?: number;
        noDataShapeHeight?: number;
        maxMin?: boolean;
        maxMinLabels?: [string, string];
    }

    Hierarchy (View Summary)

    Index

    Properties

    x?: number

    Legend origin x-coordinate in pixels.

    y?: number

    Legend origin y-coordinate in pixels.

    width?: number

    Legend width in pixels.

    height?: number

    Legend height in pixels.

    title?: string

    Legend title text.

    subtitle?: string

    Legend subtitle text.

    titleFontSize?: number

    Legend title font size in pixels.

    boxPadding?: number

    Inner spacing around legend content.

    boxOpacity?: number

    Background opacity of the legend box.

    titlePadding?: number

    Padding between the title block and legend body.

    shapeWidth?: number

    Symbol swatch width in pixels.

    shapeHeight?: number

    Symbol swatch height in pixels.

    shapePadding?: number

    Horizontal gap between shape and label.

    sepLineLength?: number

    Length of separator lines in discrete legends.

    labelFontSize?: number

    Label font size in pixels.

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

    Pixel offsets applied to labels.

    labelFormatter?: (value: number, index?: number) => string

    Custom formatter for legend labels.

    decimals?: number

    Number of decimal places for auto-formatted labels.

    orientation?: "vertical" | "horizontal"

    Legend layout direction.

    ascending?: boolean

    Sort legend entries in ascending order when true.

    noData?: boolean

    Whether to display the no-data legend item.

    noDataText?: string

    Label used for no-data legend item.

    noDataPadding?: number

    Vertical gap before the no-data swatch in pixels.

    noDataShapeWidth?: number

    Width of the no-data swatch in pixels.

    noDataShapeHeight?: number

    Height of the no-data swatch in pixels.

    maxMin?: boolean

    Whether to show dataset min/max labels when supported.

    maxMinLabels?: [string, string]

    Text affixes for min/max labels as [minSuffix, maxSuffix].