MAIDR JavaScript API
    Preparing search index...

    Interface ChartJsGeoValue

    One row of a chartjs-chart-geo dataset — a choropleth region, or a bubble on a bubble map.

    The two controllers take different rows and the fields say which: a choropleth shades a GeoJSON feature and may declare a center for it, while a bubble map carries its own position. Measured on chartjs-chart-geo@4 against a running chart, the bubble map's parse reads longitude ?? x and latitude ?? y, so both spellings are the caller's degrees rather than pixels.

    The value itself is deliberately absent: its field name is whatever scales.color.property / scales.size.property names, defaulting to 'value', so it is read from ChartJsParsedValue.r where the parse has already resolved it.

    interface ChartJsGeoValue {
        feature?: { properties?: Record<string, unknown> };
        center?: { longitude: number; latitude: number };
        longitude?: number;
        latitude?: number;
        [column: string]: unknown;
    }

    Indexable

    • [column: string]: unknown

      The author's own columns, whichever of them carries the value.

    Index

    Properties

    feature?: { properties?: Record<string, unknown> }

    The GeoJSON feature a choropleth row shades.

    center?: { longitude: number; latitude: number }

    A choropleth row's centroid, in degrees, when its author declared one.

    The only geographic position a choropleth carries. The drawn element's x/y are pixels on the canvas and its getCenterPoint() the same, so a row without this has no centroid to emit.

    longitude?: number

    A bubble map row's longitude, degrees east.

    latitude?: number

    A bubble map row's latitude, degrees north.