/** * Line series: a route drawn through the places it actually passes. * * The mark for GPS traces, shipping lanes, pipelines, historical journeys and * transit lines. It differs from the arc series in what the caller supplies: * an arc is two endpoints and the series derives the great circle between * them, while a line is the vertex sequence itself, drawn in order. * * Rendering still goes through the projection's path generator rather than * connecting projected vertices by hand, and that buys the two things a * hand-drawn polyline silently gets wrong: clipping (a route leaving the right * edge of the map re-enters at the left instead of streaking backwards across * the world) and correct behaviour under rotated and clipped projections. The * corollary is that each segment between consecutive vertices follows the * sphere's shortest path, so a sparse pair of waypoints an ocean apart will * bow rather than run straight; a route with real intermediate vertices is * unaffected. That is the geographically honest reading of "the route passed * through these points". * * @module series/Line */ import { Scale } from '../scales/Scale'; import { SizeScale } from '../scales/SizeScale'; import { Viewport } from '../geo/Viewport'; import type { LineSeriesOptions, LonLat, MarkItem, NormalizedGeo, WorldPoint } from '../types'; import type { PathSpec } from '../renderers/SvgRenderer'; export interface LineItem extends MarkItem { path: LonLat[]; /** Path data in world space, rebuilt whenever the projection changes. */ d: string; width: number; color?: string; } export declare class LineSeries { static readonly type: "line"; static readonly kind: "paths"; readonly type: "line"; readonly kind: "paths"; readonly config: LineSeriesOptions; readonly index: number; readonly id: string; readonly warnings: string[]; readonly items: LineItem[]; readonly widthScale: SizeScale; readonly colorScale: Scale | null; /** Class indices switched off from the legend. See `series/Arc`. */ readonly mutedClasses: Set; constructor({ config, index, viewport, }: { config: LineSeriesOptions; geo: NormalizedGeo; index: number; viewport: Viewport; }); /** * Rebuild path data. Called on construction and after any projection change, * because the drawn geometry is projection-dependent while the vertices are * not. */ reproject(viewport: Viewport): void; itemAt(index: number): LineItem | undefined; colorFor(item: LineItem): string; /** Whether the legend has switched off the class this route falls in. */ isMuted(item: LineItem): boolean; paths(): PathSpec[]; /** Start and end dots, drawn as screen-space symbols so they keep a constant size. */ endpoints(viewport: Viewport): { key: string; item: number; world: WorldPoint; radius: number; fill: string; }[]; legendTitle(): string | undefined; /** Switch a legend class off, or back on. Returns the new muted state. */ toggleClass(classIndex: number): boolean; legendItems(): never[]; describe(item: LineItem): string; advise(): string[]; /** A datum's vertex sequence, under `path` or its GeoJSON-habit synonym. */ private resolvePath; } //# sourceMappingURL=Line.d.ts.map