import type { MapChart } from "./MapChart"; import type { GeoProjection, GeoPath } from "d3-geo"; import type { DataItem } from "../../core/render/Component"; import type { Sprite } from "../../core/render/Sprite"; import { Series, ISeriesSettings, ISeriesDataItem, ISeriesPrivate, ISeriesEvents } from "../../core/render/Series"; export interface IMapSeriesDataItem extends ISeriesDataItem { geometry?: GeoJSON.Geometry; geometryType?: GeoJSON.GeoJsonGeometryTypes; value?: number; } export interface IMapSeriesSettings extends ISeriesSettings { /** * Counts the series' geometries when the chart fits the map to its area. * Turn it off for a background series, so the map fits the rest. Point, * line and sankey series have it off by default. When it is on, adding or * removing data fits the map again, so keep it off for data that changes * often. * * @default true * @since 5.2.36 */ affectsBounds?: boolean; /** * Map data in GeoJSON format. */ geoJSON?: GeoJSON.GeoJSON; /** * Ids of the geodata objects to show; the others are hidden. */ include?: Array; /** * Ids of the geodata objects to hide. */ exclude?: Array; /** * Field in `data` that holds each map object's numeric value, for use in * tooltips, heat rules and such. */ valueField?: string; /** * @ignore */ geometryField?: string; /** * @ignore */ geometryTypeField?: string; /** * Names, keyed by id, to replace the names in the geodata with, such as * translated country names. Read when the series parses `geoJSON`. * * ```TypeScript * import am5geodata_lang_ES from "@amcharts/amcharts5-geodata/lang/ES"; * // ... * const polygonSeries = chart.series.push(am5map.MapPolygonSeries.new(root, { * geoJSON: am5geodata_worldLow, * geodataNames: am5geodata_lang_ES * })); * ``` * ```JavaScript * var polygonSeries = chart.series.push(am5map.MapPolygonSeries.new(root, { * geoJSON: am5geodata_worldLow, * geodataNames: am5geodata_lang_ES * })); * ``` * * @since 5.1.13 * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-translations/} for more info */ geodataNames?: { [index: string]: string; }; } export interface IMapSeriesPrivate extends ISeriesPrivate { } export interface IMapSeriesEvents extends ISeriesEvents { /** * The series finished turning its `geoJSON` into data items. */ geodataprocessed: {}; } /** * Base class for map series. */ export declare abstract class MapSeries extends Series { static className: string; static classNames: Array; chart: MapChart | undefined; _settings: IMapSeriesSettings; _privateSettings: IMapSeriesPrivate; _dataItemSettings: IMapSeriesDataItem; _events: IMapSeriesEvents; protected _types: Array; _geometries: Array; protected _geoJSONparsed: boolean; protected _excluded: Array>; protected _notIncluded: Array>; protected _afterNew(): void; protected _handleDirties(): void; _prepareChildren(): void; protected _excludeDataItem(dataItem: DataItem): void; protected _unexcludeDataItem(dataItem: DataItem): void; protected _notIncludeDataItem(dataItem: DataItem): void; protected _unNotIncludeDataItem(dataItem: DataItem): void; protected _setExcluded(sprite: Sprite, excluded: boolean): void; protected checkInclude(id: string, includes: string[] | undefined, excludes?: string[] | undefined): boolean; protected _parseGeoJSON(): void; /** * @ignore */ abstract markDirtyProjection(): void; _placeBulletsContainer(_chart: MapChart): void; _removeBulletsContainer(): void; /** * @ignore */ projection(): GeoProjection | undefined; /** * @ignore */ geoPath(): GeoPath | undefined; protected _addGeometry(geometry: any, series: MapSeries): void; protected _removeGeometry(geometry: any): void; protected _dispose(): void; /** * @ignore */ _onGoHome(): void; protected _onDataClear(): void; } //# sourceMappingURL=MapSeries.d.ts.map