eurostat-map
    Preparing search index...

    Interface TrivariateLegendConfig

    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 TrivariateLegendConfig {
        x?: number;
        y?: number;
        position?: "top right" | "bottom right" | "top left" | "bottom left";
        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;
        width?: number;
        height?: number;
        padding?: { top: number; right: number; bottom: number; left: number };
        type?: "discrete" | "continuous";
        showCenter?: boolean;
        centerLabel?: string;
        showLines?: boolean;
        gridBreaks?: number;
        minorSubdivisions?: number;
        labels?: [string, string, string];
        labelPosition?: "corner" | "edge";
        colorTarget?: "triangles" | "points";
        showData?: boolean;
        centerAnnotationOffsets?: {
            labelX: number;
            labelY: number;
            curveX: number;
            curveY: 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.

    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
    width?: number

    Width of the legend in pixels.

    160
    
    height?: number

    Height of the legend in pixels.

    160
    
    padding?: { top: number; right: number; bottom: number; left: number }

    Padding around the ternary plot.

    { top: 50, right: 50, bottom: 10, left: 50 }
    
    type?: "discrete" | "continuous"

    Plot type.

    'continuous'
    
    showCenter?: boolean

    Whether to show the center point and guide lines.

    true
    
    centerLabel?: string

    Label for the center annotation.

    'Average'
    
    showLines?: boolean

    Whether to show grid lines.

    false
    
    gridBreaks?: number

    Number of major grid breaks.

    5
    
    minorSubdivisions?: number

    Number of minor grid subdivisions between major grid lines.

    5
    
    labels?: [string, string, string]

    Axis corner labels.

    ['Variable 1', 'Variable 2', 'Variable 3']
    
    labelPosition?: "corner" | "edge"

    Position of axis labels.

    'edge'
    
    colorTarget?: "triangles" | "points"

    Whether colour is applied to triangles or data points.

    'points'
    
    showData?: boolean

    Whether to render data points.

    true
    
    centerAnnotationOffsets?: {
        labelX: number;
        labelY: number;
        curveX: number;
        curveY: number;
    }

    Offsets for the center annotation label and curve.