eurostat-map
    Preparing search index...

    Interface ProportionalSymbolMap

    Proportional symbol map object

    interface ProportionalSymbolMap {
        svgId(): string;
        svgId(id: string): this;
        containerId(): string;
        containerId(id: string): this;
        width(): number;
        width(w: number): this;
        height(): number;
        height(h: number): this;
        geo(): string;
        geo(g: string): this;
        proj(): string;
        proj(p: string): this;
        scale(): string;
        scale(s: "60M" | "20M" | "10M" | "03M" | "01M"): this;
        nutsLevel(): number | "mixed";
        nutsLevel(level: number | "mixed"): this;
        nutsYear(): number;
        nutsYear(year: number): this;
        position(v: { x?: number; y?: number; z?: number }): this;
        position(): { x: number; y: number; z: number };
        projectionFunction(): any;
        projectionFunction(fn: any): this;
        title(): string;
        title(t: string): this;
        subtitle(): string;
        subtitle(t: string): this;
        footnote(): string | false;
        footnote(text: string | false): this;
        footnoteTooltipText(): string | false;
        footnoteTooltipText(text: string | false): this;
        footnoteWrap(): number | false;
        footnoteWrap(chars: number | false): this;
        stat(): | StatConfig
        | CompositionStatConfig<Record<string, Record<string, number>>>;
        stat(
            config:
                | StatConfig
                | CompositionStatConfig<Record<string, Record<string, number>>>,
        ): this;
        stat(
            key: string,
        ):
            | StatConfig
            | CompositionStatConfig<Record<string, Record<string, number>>>;
        stat(
            key: string,
            config:
                | StatConfig
                | CompositionStatConfig<Record<string, Record<string, number>>>,
        ): this;
        stat(
            key: string,
            config:
                | StatConfig
                | CompositionStatConfig<Record<string, Record<string, number>>>,
            categoryParameter: string,
            categoryCodes?: string[],
            categoryLabels?: string[],
            categoryColors?: string[],
            totalCode?: string,
        ): this;
        encoding(): Record<string, EncodingConfig>;
        encoding(channel: string): EncodingConfig;
        encoding(channel: string, config: EncodingConfig): this;
        encoding(configs: Record<string, EncodingConfig>): this;
        getEncodingStat(channel: string, fallback?: string): string;
        getEncodingStats(channel: string, fallback?: string[]): string[];
        getEncodingStatKey(
            channel: string,
            categoryCode?: string,
            fallbackStat?: string,
        ): string;
        getEncodingStatData(
            channel: string,
            categoryCode?: string,
            fallbackStat?: string,
        ): StatData;
        getEncodingValue(
            channel: string,
            regionId: string,
            categoryCode?: string,
            fallbackStat?: string,
        ): string | number;
        getEncodingUnitText(
            channel: string,
            categoryCode?: string,
            fallbackStat?: string,
        ): string;
        statData(): StatData;
        statData(key: string): StatData;
        statData(key: string, data: StatData): this;
        getTime(): string;
        noDataText(): string;
        noDataText(text: string): this;
        language(): string;
        language(lang: string): this;
        legend(): false | LegendConfig;
        legend(config: false | LegendConfig): this;
        updateLegend(): this;
        tooltip(): TooltipConfig;
        tooltip(config: TooltipConfig): this;
        zoomExtent(): [number, number];
        zoomExtent(extent: [number, number]): this;
        zoomButtons(): boolean;
        zoomButtons(show: boolean): this;
        gridCartogramSettings(): GridCartogramSettings;
        gridCartogramSettings(settings: Partial<GridCartogramSettings>): this;
        insets(): false | "default" | InsetConfig[];
        insets(config: false | "default" | InsetConfig[]): this;
        drawGraticule(): boolean;
        drawGraticule(show: boolean): this;
        drawCoastalMargin(): boolean;
        drawCoastalMargin(show: boolean): this;
        coastalMarginSettings(): CoastalMarginSettings;
        coastalMarginSettings(settings: Partial<CoastalMarginSettings>): this;
        placenames(): boolean;
        placenames(show: boolean): this;
        labels(): object;
        labels(config: object): this;
        annotations(): any;
        annotations(config: any): this;
        stamp(): object;
        stamp(config: { x: number; y: number; text: string; size?: number }): this;
        scalebar(): ScalebarConfig;
        scalebar(config: boolean | ScalebarConfig): this;
        showScalebar(): boolean;
        showScalebar(show: boolean): this;
        scalebarPosition(): [number, number];
        scalebarPosition(pos: [number, number]): this;
        showEstatLogo(): boolean;
        showEstatLogo(show: boolean): this;
        showEstatRibbon(): boolean;
        showEstatRibbon(show: boolean): this;
        svg(): any;
        svg(s: any): this;
        filterGeometriesFunction(): (geometry: any) => boolean;
        filterGeometriesFunction(fn: (geometry: any) => boolean): this;
        gridCartogram(): boolean;
        gridCartogram(enable: boolean): this;
        backgroundMap(): boolean;
        backgroundMap(show: boolean): this;
        minimap(): any;
        minimap(config: any): this;
        insetsButton(): boolean;
        insetsButton(show: boolean): this;
        legendButton(): boolean;
        legendButton(show: boolean): this;
        placenamesFilter(): (name: any) => boolean;
        placenamesFilter(fn: (name: any) => boolean): this;
        header(): boolean;
        header(show: boolean): this;
        footer(): boolean;
        footer(show: boolean): this;
        footerPadding(): number;
        footerPadding(padding: number): this;
        headerPadding(): number;
        headerPadding(padding: number): this;
        titlePosition(): [number, number];
        titlePosition(pos: [number, number]): this;
        subtitlePosition(): [number, number];
        subtitlePosition(pos: [number, number]): this;
        footnotePosition(): [number, number];
        footnotePosition(pos: [number, number]): this;
        logoPosition(): [number, number];
        logoPosition(pos: [number, number]): this;
        ribbonPosition(): [number, number];
        ribbonPosition(pos: [number, number]): this;
        zoomButtonsPosition(): [number, number];
        zoomButtonsPosition(pos: [number, number]): this;
        insetsButtonPosition(): [number, number];
        insetsButtonPosition(pos: [number, number]): this;
        legendButtonPosition(): [number, number];
        legendButtonPosition(pos: [number, number]): this;
        hoverColor(): string;
        hoverColor(color: string): this;
        showSourceLink(): boolean;
        showSourceLink(show: boolean): this;
        patternFill(): any;
        patternFill(config: any): this;
        dorlingSettings(): DorlingSettings;
        dorlingSettings(settings: Partial<DorlingSettings>): this;
        onZoomEnd(): (event: any) => void;
        onZoomEnd(fn: (event: any) => void): this;
        onZoom(): (event: any) => void;
        onZoom(fn: (event: any) => void): this;
        onRegionMouseOver(): (
            event: MouseEvent,
            regionId: string,
            props: any,
        ) => void;
        onRegionMouseOver(
            fn: (event: MouseEvent, regionId: string, props: any) => void,
        ): this;
        onRegionMouseMove(): (
            event: MouseEvent,
            regionId: string,
            props: any,
        ) => void;
        onRegionMouseMove(
            fn: (event: MouseEvent, regionId: string, props: any) => void,
        ): this;
        onRegionMouseOut(): (
            event: MouseEvent,
            regionId: string,
            props: any,
        ) => void;
        onRegionMouseOut(
            fn: (event: MouseEvent, regionId: string, props: any) => void,
        ): this;
        onRegionClick(): (event: MouseEvent, regionId: string, props: any) => void;
        onRegionClick(
            fn: (event: MouseEvent, regionId: string, props: any) => void,
        ): this;
        onBuild(): (map: MapInstance) => void;
        onBuild(callback: (map: MapInstance) => void): this;
        build(): this;
        updateGeoData(): this;
        updateStatData(): this;
        updateStatValues(): this;
        updateClassification(): this;
        updateStyle(): this;
        recalculateLayout(): void;
        exportMapToSVG(): this;
        exportMapToPNG(
            width?: number,
            height?: number,
        ): Promise<ProportionalSymbolMap>;
        setFromURL(): this;
        transitionDuration(): number;
        transitionDuration(ms: number): this;
        filtersDefinitionFunction(): (svg: any, numberOfClasses: number) => void;
        filtersDefinitionFunction(
            fn: (svg: any, numberOfClasses: number) => void,
        ): this;
        regionCentroids(): { id: string; x: number; y: number }[];
        layers_: Layer[];
        activeLayerIndex_: number;
        activeLayer(): Layer;
        layer(ref?: string | number): Layer;
        layers(): Layer[];
        layers(configs: LayerConfig[]): this;
        addLayer(type: string, config?: LayerConfig): Layer;
        addLayer(config: LayerConfig): Layer;
        removeLayer(ref: string | number): this;
        activeLayerIndex(): number;
        activeLayerIndex(i: number): this;
        updateAllLayers(): this;
        psSettings(): ProportionalSymbolSettings;
        psSettings(v: ProportionalSymbolSettings): this;
        psMaxSize(): number;
        psMaxSize(v: number): this;
        psMinSize(): number;
        psMinSize(v: number): this;
        psMaxValue(): number;
        psMaxValue(v: number): this;
        psMinValue(): number;
        psMinValue(v: number): this;
        psFill(): string;
        psFill(v: string): this;
        psFillOpacity(): number;
        psFillOpacity(v: number): this;
        psStrokeOpacity(): number;
        psStrokeOpacity(v: number): this;
        psStroke(): string;
        psStroke(v: string): this;
        psStrokeWidth(): number;
        psStrokeWidth(v: number): this;
        classifierSize(): any;
        classifierSize(v: any): this;
        classifierColor(): any;
        classifierColor(v: any): this;
        psShape(): string;
        psShape(v: string): this;
        psCustomShape(): any;
        psCustomShape(v: any): this;
        psBarWidth(): number;
        psBarWidth(v: number): this;
        psClassToFillStyle(): any;
        psClassToFillStyle(v: any): this;
        psColorFun(): any;
        psColorFun(v: any): this;
        psSizeScale(): any;
        psSizeScale(v: any): this;
        noDataFillStyle(): string;
        noDataFillStyle(v: string): this;
        psThresholds(): number[];
        psThresholds(v: number[]): this;
        psColors(): string[];
        psColors(v: string[]): this;
        psCustomSVG(): any;
        psCustomSVG(v: any): this;
        psOffset(): { x: number; y: number };
        psOffset(v: { x: number; y: number }): this;
        psClassificationMethod(): string;
        psClassificationMethod(v: string): this;
        psClasses(): number;
        psClasses(v: number): this;
        dorling(): boolean;
        dorling(v: boolean): this;
        psSpikeWidth(): number;
        psSpikeWidth(v: number): this;
        psCodeLabels(): boolean;
        psCodeLabels(v: boolean): this;
        psBrightenFactor(): number;
        psBrightenFactor(v: number): this;
        [key: string]: any;
    }

    Hierarchy (View Summary)

    Indexable

    • [key: string]: any

      Allow additional map-type-specific properties and methods.

    Index

    Properties

    Methods

    svgId containerId width height geo proj scale nutsLevel nutsYear position projectionFunction title subtitle footnote footnoteTooltipText footnoteWrap stat encoding getEncodingStat getEncodingStats getEncodingStatKey getEncodingStatData getEncodingValue getEncodingUnitText statData getTime noDataText language legend updateLegend tooltip zoomExtent zoomButtons gridCartogramSettings insets drawGraticule drawCoastalMargin coastalMarginSettings placenames labels annotations stamp scalebar showScalebar scalebarPosition showEstatLogo showEstatRibbon svg filterGeometriesFunction gridCartogram backgroundMap minimap insetsButton legendButton placenamesFilter header footer footerPadding headerPadding titlePosition subtitlePosition footnotePosition logoPosition ribbonPosition zoomButtonsPosition insetsButtonPosition legendButtonPosition hoverColor showSourceLink patternFill dorlingSettings onZoomEnd onZoom onRegionMouseOver onRegionMouseMove onRegionMouseOut onRegionClick onBuild build updateGeoData updateStatData updateStatValues updateClassification updateStyle recalculateLayout exportMapToSVG exportMapToPNG setFromURL transitionDuration filtersDefinitionFunction regionCentroids activeLayer layer layers addLayer removeLayer activeLayerIndex updateAllLayers psSettings psMaxSize psMinSize psMaxValue psMinValue psFill psFillOpacity psStrokeOpacity psStroke psStrokeWidth classifierSize classifierColor psShape psCustomShape psBarWidth psClassToFillStyle psColorFun psSizeScale noDataFillStyle psThresholds psColors psCustomSVG psOffset psClassificationMethod psClasses dorling psSpikeWidth psCodeLabels psBrightenFactor

    Properties

    layers_: Layer[]

    Ordered thematic layer stack (bottom → top).

    activeLayerIndex_: number

    Methods

    • Initial map viewport. x/y in projected coordinates, z is pixel size (map units per screen pixel — smaller = more zoomed in).

      Parameters

      • v: { x?: number; y?: number; z?: number }

      Returns this

      map.position({ x: 4800000, y: 3400000, z: 6000 })
      
    • Returns { x: number; y: number; z: number }

    • Returns the concrete statData key for a channel/category combination.

      Parameters

      • channel: string
      • OptionalcategoryCode: string
      • OptionalfallbackStat: string

      Returns string

    • Returns a region value through encoding lookup.

      Parameters

      • channel: string
      • regionId: string
      • OptionalcategoryCode: string
      • OptionalfallbackStat: string

      Returns string | number

    • Returns unit text through encoding lookup.

      Parameters

      • channel: string
      • OptionalcategoryCode: string
      • OptionalfallbackStat: string

      Returns string

    • Returns the time dimension value from the loaded Eurostat dataset. Useful for displaying the data period in the map title.

      Returns string

      map.onBuild(() => map.title('Population ' + map.getTime()))
      
    • Builds the map from scratch. Call once after initial configuration.

      Returns this

      eurostatmap.map('choropleth')
      .stat({ eurostatDatasetCode: 'demo_r_d3dens' })
      .build()