eurostat-map
    Preparing search index...

    Interface BivariateLegendConfig

    Configuration for bivariate choropleth map legends. Displays a 2D grid showing the relationship between two variables, with color squares representing different class combinations.

    interface BivariateLegendConfig {
        x?: number;
        y?: number;
        position?: "top right" | "bottom right" | "top left" | "bottom left";
        width?: number;
        height?: number;
        title?: string;
        subtitle?: string;
        titleFontSize?: number;
        boxPadding?: number;
        boxOpacity?: number;
        onlyApplyOpacityWhileZoomed?: boolean;
        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];
        layer?: any;
        squareSize?: number;
        rotation?: number;
        label1?: string;
        label2?: string;
        breaks1?: (string | number)[];
        breaks2?: (string | number)[];
        tickLength?: number;
        yAxisLabelsOffset?: { x: number; y: number };
        xAxisLabelsOffset?: { x: number; y: number };
        yAxisTitleOffset?: { x: number; y: number };
        xAxisTitleOffset?: { x: number; y: number };
        axisTitleFontSize?: number;
        noDataYOffset?: number;
        axisArrows?: boolean | { x?: boolean; y?: boolean };
        arrowHeight?: number;
        arrowWidth?: number;
        arrowPadding?: number;
        axisExtremes?: {
            x?: { low?: string; high?: string };
            y?: { low?: string; high?: string };
        };
        showAxisExtremes?: boolean
        | { x?: boolean; y?: boolean };
        annotations?: {
            topRight?: string;
            bottomRight?: string;
            bottomLeft?: string;
            topLeft?: string;
        };
        annotationLineLength?: | number
        | {
            topRight?: number;
            bottomRight?: number;
            bottomLeft?: number;
            topLeft?: number;
        };
        annotationOffsets?: | { x?: number; y?: number }
        | {
            topRight?: { x?: number; y?: number };
            bottomRight?: { x?: number; y?: number };
            bottomLeft?: { x?: number; y?: number };
            topLeft?: { x?: number; y?: number };
        };
        annotationLineEndOffsets?: | { x?: number; y?: number }
        | {
            topRight?: { x?: number; y?: number };
            bottomRight?: { x?: number; y?: number };
            bottomLeft?: { x?: number; y?: number };
            topLeft?: { x?: number; y?: number };
        };
    }

    Hierarchy (View Summary)

    Index

    Properties

    x?: number

    Legend origin x-coordinate in pixels.

    y?: number

    Legend origin y-coordinate in pixels.

    position?: "top right" | "bottom right" | "top left" | "bottom left"

    Automatically position the legend in a map corner. Manual x/y coordinates take precedence.

    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.

    onlyApplyOpacityWhileZoomed?: boolean

    Apply the legend box's background opacity (boxOpacity) only while the map is currently zoomed in (scale != 1). The legend box is transparent at the initial view and returns to its configured opacity while zoomed. Purely a box-opacity concern - does not affect legend hover interactions (e.g. hover-to-highlight), which always work regardless of zoom state.

    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].

    layer?: any
    squareSize?: number

    Size of the legend square grid in pixels.

    100
    
    rotation?: number

    Rotation angle of the legend in degrees.

    0
    
    label1?: string

    Label for the first variable (x-axis). Supports \\n and <br> line breaks.

    'Variable 1'
    
    label2?: string

    Label for the second variable (y-axis). Supports \\n and <br> line breaks.

    'Variable 2'
    
    breaks1?: (string | number)[]

    Break labels for the first variable. Omit to hide first-axis break labels.

    breaks2?: (string | number)[]

    Break labels for the second variable. Omit to hide second-axis break labels.

    tickLength?: number

    Length of axis tick marks in pixels.

    5
    
    yAxisLabelsOffset?: { x: number; y: number }

    Offset adjustments for y-axis labels.

    { x: 0, y: 0 }
    
    xAxisLabelsOffset?: { x: number; y: number }

    Offset adjustments for x-axis labels.

    { x: 0, y: 0 }
    
    yAxisTitleOffset?: { x: number; y: number }

    Offset adjustments for y-axis title.

    { x: 0, y: 0 }
    
    xAxisTitleOffset?: { x: number; y: number }

    Offset adjustments for x-axis title.

    { x: 0, y: 0 }
    
    axisTitleFontSize?: number

    Font size of the axis titles in pixels. Defaults to the value defined by the legend CSS.

    noDataYOffset?: number

    Extra vertical offset for the "no data" legend item in pixels.

    30
    
    axisArrows?: boolean | { x?: boolean; y?: boolean }

    Whether to show arrows at the end of both axes, or for each axis independently.

    true
    
    arrowHeight?: number

    Height of axis arrows in pixels.

    15
    
    arrowWidth?: number

    Width of axis arrows in pixels.

    14
    
    arrowPadding?: number

    Padding between arrow and axis label in pixels.

    10
    
    axisExtremes?: {
        x?: { low?: string; high?: string };
        y?: { low?: string; high?: string };
    }

    Labels displayed at low/high ends of each axis.

    { x: { low: 'Low', high: 'High' }, y: { low: 'Low', high: 'High' } }
    
    showAxisExtremes?: boolean | { x?: boolean; y?: boolean }

    Whether to show low/high endpoint labels on both axes, or for each axis independently.

    true
    
    annotations?: {
        topRight?: string;
        bottomRight?: string;
        bottomLeft?: string;
        topLeft?: string;
    }

    Optional text annotations for each corner of the bivariate square. Add text for any combination of topRight, bottomRight, bottomLeft, topLeft. Supports line breaks using '
    '/'
    ' or '\n'.

    annotationLineLength?:
        | number
        | {
            topRight?: number;
            bottomRight?: number;
            bottomLeft?: number;
            topLeft?: number;
        }

    Length of corner annotation callout lines in pixels. Can be a single number for all corners, or per-corner values.

    18
    
    annotationOffsets?:
        | { x?: number; y?: number }
        | {
            topRight?: { x?: number; y?: number };
            bottomRight?: { x?: number; y?: number };
            bottomLeft?: { x?: number; y?: number };
            topLeft?: { x?: number; y?: number };
        }

    Annotation text offsets in pixels. Use global { x, y } or per-corner values.

    auto (based on corner direction)
    
    annotationLineEndOffsets?:
        | { x?: number; y?: number }
        | {
            topRight?: { x?: number; y?: number };
            bottomRight?: { x?: number; y?: number };
            bottomLeft?: { x?: number; y?: number };
            topLeft?: { x?: number; y?: number };
        }

    Extra offset applied to the leader-line endpoint where it meets the annotation label. Use global { x, y } or per-corner values.

    { x: 0, y: 0 }