import { GeoProjection } from 'd3-geo'; import { ComponentConfigInterface } from '../../core/component/config'; import { ColorAccessor, NumericAccessor, StringAccessor } from '../../types/accessor'; import { MapPointLabelPosition, TopoJSONMapClusterDatum, TopoJSONMapPointStyles } from './types'; export interface TopoJSONMapConfigInterface extends ComponentConfigInterface { /** MapProjection (aka D3's GeoProjection) instance. Default: `MapProjection.Kavrayskiy7()` */ projection?: GeoProjection; /** Map data in the TopoJSON topology format. Default: `undefined` */ topojson?: TopoJSON.Topology; /** Name of the map features to be displayed, e.g. 'countries' or 'counties'. Default: `countries` */ mapFeatureName?: string; /** Set initial map fit to points instead of topojson features. Default: `false` */ mapFitToPoints?: boolean; /** Initial zoom level. Default: `undefined` */ zoomFactor?: number; /** Zoom to a specific location. When set, the map will zoom to the specified coordinates at the given zoom level. * Format: `{ coordinates: [longitude, latitude], zoomLevel: number, expandCluster?: boolean }` * When `expandCluster` is true, the cluster at or nearest to the coordinates will be expanded. * Default: `undefined` */ zoomToLocation?: { coordinates: [number, number]; zoomLevel: number; expandCluster?: boolean; }; /** Disable pan / zoom interactions. Default: `false` */ disableZoom?: boolean; /** Zoom extent. Default: `[0.5, 6]` */ zoomExtent?: number[]; /** Zoom animation duration. Default: `400` */ zoomDuration?: number; /** Link width value or accessor function. Default: `d => d.width ?? 1` */ linkWidth?: NumericAccessor; /** Link color value or accessor function. Default: `d => d.color ?? null` */ linkColor?: ColorAccessor; /** Link cursor value or accessor function. Default: `null` */ linkCursor?: StringAccessor; /** Link id accessor function. Default: `d => d.id` */ linkId?: StringAccessor; /** Link source accessor function. Default: `d => d.source` */ linkSource?: ((l: LinkDatum) => number | string | PointDatum); /** Link target accessor function. Default: `d => d.target` */ linkTarget?: ((l: LinkDatum) => number | string | PointDatum); /** Flow source point longitude accessor function or value. Default: `f => f.sourceLongitude` */ sourceLongitude?: NumericAccessor; /** Flow source point latitude accessor function or value. Default: `f => f.sourceLatitude` */ sourceLatitude?: NumericAccessor; /** Flow target point longitude accessor function or value. Default: `f => f.targetLongitude` */ targetLongitude?: NumericAccessor; /** Flow target point latitude accessor function or value. Default: `f => f.targetLatitude` */ targetLatitude?: NumericAccessor; /** Flow source point radius accessor function or value. Default: `3` */ sourcePointRadius?: NumericAccessor; /** Source point color accessor function or value. Default: `'#88919f'` */ sourcePointColor?: ColorAccessor; /** Flow particle color accessor function or value. Default: `'#949dad'` */ flowParticleColor?: ColorAccessor; /** Flow particle radius accessor function or value. Default: `1.1` */ flowParticleRadius?: NumericAccessor; /** Flow particle speed accessor function or value. The unit is arbitrary, recommended range is 0 – 0.2. Default: `0.07` */ flowParticleSpeed?: NumericAccessor; /** Flow particle density accessor function or value on the range of [0, 1]. Default: `0.6` */ flowParticleDensity?: NumericAccessor; /** Enable flow animations. When true, shows animated particles along links. Default: `false` */ enableFlowAnimation?: boolean; /** Flow source point click callback function. Default: `undefined` */ onSourcePointClick?: (f: LinkDatum, x: number, y: number, event: MouseEvent) => void; /** Flow source point mouse over callback function. Default: `undefined` */ onSourcePointMouseEnter?: (f: LinkDatum, x: number, y: number, event: MouseEvent) => void; /** Flow source point mouse leave callback function. Default: `undefined` */ onSourcePointMouseLeave?: (f: LinkDatum, event: MouseEvent) => void; /** Area id accessor function corresponding to the feature id from TopoJSON. Default: `d => d.id ?? ''` */ areaId?: StringAccessor; /** Area color value or accessor function. Default: `d => d.color ?? null` */ areaColor?: ColorAccessor; /** Area cursor value or accessor function. Default: `null` */ areaCursor?: StringAccessor; /** Area label accessor function. Default: `undefined` */ areaLabel?: StringAccessor; /** Point color accessor. Default: `d => d.color ?? null` */ pointColor?: ColorAccessor; /** Point radius accessor. Default: `d => d.radius ?? 8` */ pointRadius?: NumericAccessor; /** Point stroke width accessor. Default: `d => d.strokeWidth ?? null` */ pointStrokeWidth?: NumericAccessor; /** Point shape accessor. Default: `TopoJSONMapPointShape.Circle` */ pointShape?: StringAccessor; /** Point ring width for ring-shaped points. Default: `2` */ pointRingWidth?: NumericAccessor; /** Point cursor constant value or accessor function. Default: `null` */ pointCursor?: StringAccessor; /** Point longitude accessor function. Default: `d => d.longitude ?? null` */ longitude?: NumericAccessor; /** Point latitude accessor function. Default: `d => d.latitude ?? null` */ latitude?: NumericAccessor; /** Point inner label accessor function. Default: `undefined` */ pointLabel?: StringAccessor; /** Point inner label color accessor function or constant value. * By default, the label color will be set, depending on the point brightness, either to * `--vis-map-point-label-text-color-dark` or to `--vis-map-point-label-text-color-light` CSS variable. * Default: `undefined` */ pointLabelColor?: ColorAccessor; /** Point label position. Default: `MapPointLabelPosition.Center` * @deprecated Point labels are now always centered within points. Use pointBottomLabel for labels below points. */ pointLabelPosition?: MapPointLabelPosition; /** Point bottom label accessor function. Default: `undefined` */ pointBottomLabel?: StringAccessor; /** Point color brightness ratio for switching between dark and light text label color. Default: `0.65` */ pointLabelTextBrightnessRatio?: number; /** Point id accessor function. Default: `d => d.id` */ pointId?: ((d: PointDatum, i: number) => string); /** Cluster color accessor function or constant value. Default: `undefined` */ clusterColor?: ColorAccessor>; /** Cluster radius accessor function or constant value. Default: `undefined` */ clusterRadius?: NumericAccessor>; /** Cluster inner label accessor function. Default: `d => d.pointCount` */ clusterLabel?: StringAccessor>; /** Cluster inner label color accessor function or constant value. Default: `undefined` */ clusterLabelColor?: StringAccessor>; /** Cluster bottom label accessor function. Default: `''` */ clusterBottomLabel?: StringAccessor>; /** The width of the cluster point ring. Default: `2` */ clusterRingWidth?: number; /** When cluster is expanded, show a background circle to better separate points from the base map. Default: `true` */ clusterBackground?: boolean; /** Defines whether the cluster should expand on click or not. Default: `true` */ clusterExpandOnClick?: boolean; /** Clustering distance in pixels. Default: `55` */ clusteringDistance?: number; /** Enable point clustering. Default: `false` */ clustering?: boolean; /** Enables blur and blending between neighbouring points. Default: `false` */ heatmapMode?: boolean; /** Heatmap blur filter stdDeviation value. Default: `10` */ heatmapModeBlurStdDeviation?: number; /** Zoom level at which the heatmap mode will be disabled. Default: `2.5` */ heatmapModeZoomLevelThreshold?: number; /** A single map point can have multiple properties displayed as a small pie chart. * By setting the colorMap configuration you can specify data properties that should be mapped to various pie / donut segments. * * ``` * { * [key in keyof PointDatum]?: { color: string, className?: string } * } * ``` * e.g.: * ``` * { * healthy: { color: 'green' }, * warning: { color: 'orange' }, * critical: { color: 'red' } * } * ``` * where every data point has the `healthy`, `warning` and `critical` numerical or boolean property. * Note: Properties with 0 or falsy values will not be displayed in the pie chart. * Default: `{}` */ colorMap?: TopoJSONMapPointStyles; } export declare const TopoJSONMapDefaultConfig: TopoJSONMapConfigInterface;