eurostat-map
    Preparing search index...

    Interface SparkStatConfig

    Statistical configuration for sparkline maps.

    Either eurostatDatasetCode + dates (Eurostat API path) or customData (custom data path) must be provided.

    interface SparkStatConfig {
        customData?: Record<string, Record<string, number>>;
        eurostatDatasetCode?: string;
        filters?: Record<string, any>;
        unitText?: string;
        transform?: (value: number) => number;
        dates?: string[];
        labels?: string[];
    }
    Index

    Properties

    customData?: Record<string, Record<string, number>>

    Custom data keyed by region ID then date string. Use instead of eurostatDatasetCode when supplying data directly. When customData is set, eurostatDatasetCode is not required; dates defaults to the key order of the first region's entries.

    customData: {
    ES: { '2020': 100, '2021': 120, '2022': 115 },
    DE: { '2020': 200, '2021': 190, '2022': 210 },
    }
    eurostatDatasetCode?: string

    Eurostat dataset code. Required when not using customData.

    filters?: Record<string, any>

    Filters.

    unitText?: string

    Unit text.

    transform?: (value: number) => number
    dates?: string[]

    Date keys to fetch. Required when not using customData.

    labels?: string[]

    Display labels for each date.