eurostat-map
    Preparing search index...

    Interface ChoroplethLegendConfig

    Configuration for choropleth map legends. Supports discrete, continuous, diverging, and histogram legend variants.

    interface ChoroplethLegendConfig {
        x?: number;
        y?: number;
        width?: number;
        height?: number;
        title?: string;
        subtitle?: string;
        titleFontSize?: number;
        boxPadding?: number;
        boxOpacity?: number;
        shapeWidth?: number;
        shapeHeight?: number;
        shapePadding?: number;
        labelFontSize?: number;
        orientation?: "vertical" | "horizontal";
        ascending?: boolean;
        noData?: boolean;
        noDataText?: string;
        noDataPadding?: number;
        noDataShapeWidth?: number;
        noDataShapeHeight?: number;
        titlePadding?: number;
        labelType?: "thresholds" | "ranges";
        sepLineLength?: number;
        tickLength?: number;
        decimals?: number;
        labelOffsets?: { x: number; y: number };
        labelFormatter?: (value: number, classIndex?: number) => string;
        labels?: string[];
        histogram?: Partial<HistogramLegendConfig>;
        pointOfDivergenceLabel?: string;
        pointOfDivergence?: number;
        pointOfDivergencePadding?: number;
        divergingLineLength?: number;
        divergingArrowLength?: number;
        lowLabel?: string;
        highLabel?: string;
        ticks?: number;
        tickValues?: number[];
        tickLabels?: (string | number)[];
        highlightTolerance?: number;
        maxMin?: boolean;
        maxMinLabels?: [string, string];
        maxMinTickLength?: number;
        maxMinRegionLabels?: boolean;
    }

    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.

    shapeWidth?: number

    Symbol swatch width in pixels.

    shapeHeight?: number

    Symbol swatch height in pixels.

    shapePadding?: number

    Horizontal gap between shape and label.

    labelFontSize?: number

    Label font size in pixels.

    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.

    titlePadding?: number

    Padding between the legend title and the legend body in pixels.

    5
    
    labelType?: "thresholds" | "ranges"

    Label style for discrete legends.

    'thresholds'
    
    sepLineLength?: number

    Length of the separator line in pixels for discrete legends.

    shapeWidth
    
    tickLength?: number

    Length of threshold tick marks in pixels.

    4
    
    decimals?: number

    Number of decimal places for auto-formatted labels. Auto-detected when undefined.

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

    Offset adjustments for labels.

    { x: 3, y: 0 }
    
    labelFormatter?: (value: number, classIndex?: number) => string

    Custom formatter for legend labels.

    labels?: string[]

    User-defined labels for classes in discrete legends.

    Histogram legend configuration. Set to null/undefined to disable histogram mode.

    pointOfDivergenceLabel?: string

    Label shown at the divergence point for diverging legends.

    pointOfDivergence?: number

    Class index/value position used for diverging legends.

    pointOfDivergencePadding?: number

    Extra padding around the divergence marker in pixels.

    7
    
    divergingLineLength?: number

    Explicit diverging guide line length in pixels.

    divergingArrowLength?: number

    Explicit diverging arrow length in pixels.

    lowLabel?: string

    Label shown at the low end of continuous legends.

    'Low'
    
    highLabel?: string

    Label shown at the high end of continuous legends.

    'High'
    
    ticks?: number

    Number of ticks to show on continuous legends. Use 0 to disable.

    0
    
    tickValues?: number[]

    Explicit tick values for continuous legends.

    tickLabels?: (string | number)[]

    Explicit tick labels for continuous legends.

    highlightTolerance?: number

    Pixel tolerance used when hovering continuous legends to highlight nearby regions.

    10
    
    maxMin?: boolean

    Whether to show dataset min/max labels where supported.

    true
    
    maxMinLabels?: [string, string]

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

    ['', '']
    
    maxMinTickLength?: number

    Length of min/max tick marks in pixels. Defaults to tickLength when omitted.

    maxMinRegionLabels?: boolean

    Whether to append region names to min/max labels.