import type { IMapPointSeriesDataItem, MapPointSeries } from "./MapPointSeries"; import type { DataItem } from "../../core/render/Component"; import type { IDisposer } from "../../core/util/Disposer"; import { MapSeries, IMapSeriesSettings, IMapSeriesDataItem, IMapSeriesPrivate } from "./MapSeries"; import { MapLine } from "./MapLine"; import { ListTemplate } from "../../core/util/List"; /** * @ignore */ export interface IMapLineSeriesPrivate extends IMapSeriesPrivate { } export interface IMapLineSeriesDataItem extends IMapSeriesDataItem { /** * The line that shows the data item. */ mapLine?: MapLine; /** * GeoJSON geometry of the line. */ geometry?: GeoJSON.LineString | GeoJSON.MultiLineString; /** * Data items of a [[MapPointSeries]] for the line to connect, in order. The * line follows them when they move. Fixed points can't be used. */ pointsToConnect?: Array>; /** * Ids of the points for the line to connect, looked up in `pointSeries`. * The line follows the points, and a config holds just the ids. * * The line isn't drawn until every id matches a point, so it is never drawn * short. Fixed points can't be used. Ignored if `pointsToConnect` is set. * * @since 5.20.3 */ pointIds?: Array; /** * How the line runs between its points, instead of the series' `lineType`: * * * `"curved"` - along the shortest path on the globe, which the projection may bend. * * `"straight"` - in straight lines on screen, never across the 180th meridian. * * @default "curved" * @since 5.2.32 */ lineType?: "curved" | "straight"; } export interface IMapLineSeriesSettings extends IMapSeriesSettings { /** * Hides the parts of lines on the far side of a globe, unless set to * `false`. Only projections with a hidden side, such as `geoOrthographic`, * are affected. */ clipBack?: boolean; /** * How lines run between their points: * * * `"curved"` - along the shortest path on the globe, which the projection may bend. * * `"straight"` - in straight lines on screen, never across the 180th meridian. * * @default "curved" * @since 5.2.24 */ lineType?: "curved" | "straight"; /** * @ignore */ lineTypeField?: string; /** * The point series that data items' `pointIds` refer to. * * @since 5.20.3 */ pointSeries?: MapPointSeries; /** * Field in `data` that holds each line's `pointIds`. * * @default "pointIds" * @since 5.20.3 */ pointIdsField?: string; } /** * A map series of lines, such as routes: from GeoJSON geometries, or * connecting the points of a [[MapPointSeries]]. * * @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-line-series/} for more info * @important */ export declare class MapLineSeries extends MapSeries { protected _pointSeriesDP?: IDisposer; /** * The data items whose `pointsToConnect` this series worked out from * `pointIds`, so that they can be worked out again - and one set by hand can * be left alone. */ protected _derivedPoints: WeakSet>; protected _afterNew(): void; protected _dispose(): void; /** * (Re)subscribes to the current `pointSeries` so that lines whose points were * not there yet get connected once they are. */ protected _setupPointSeriesListener(): void; /** * Retries every line that is still waiting for its points. */ protected _resolvePendingPointIds(): void; /** * Turns a data item's `pointIds` into the points themselves. Silent when an * id matches nothing: the line waits rather than being drawn short. */ protected _resolvePointIds(dataItem: DataItem): boolean; /** * @ignore */ makeMapLine(dataItem: DataItem): MapLine; /** * All lines of the series. Configure them through `mapLines.template`. * * @default new ListTemplate */ readonly mapLines: ListTemplate; static className: string; static classNames: Array; _settings: IMapLineSeriesSettings; _privateSettings: IMapLineSeriesPrivate; _dataItemSettings: IMapLineSeriesDataItem; protected _types: Array; /** * @ignore */ markDirtyProjection(): void; _prepareChildren(): void; protected processDataItem(dataItem: DataItem): void; protected _handlePointsToConnect(dataItem: DataItem): void; /** * Redraws the series, and the line of `dataItem`, rebuilding its geometry * from `pointsToConnect` if set. * * @param dataItem Data item whose line to redraw * @since 5.0.21 */ markDirtyValues(dataItem: DataItem): void; /** * @ignore */ disposeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _excludeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _unexcludeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _notIncludeDataItem(dataItem: DataItem): void; /** * @ignore */ protected _unNotIncludeDataItem(dataItem: DataItem): void; } //# sourceMappingURL=MapLineSeries.d.ts.map