@amcharts/amcharts5 5.16.2 → 5.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.internal/charts/map/MapChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/map/MapChartDefaultTheme.js +3 -0
- package/.internal/charts/map/MapChartDefaultTheme.js.map +1 -1
- package/.internal/charts/map/MapSankeyNodes.d.ts +155 -0
- package/.internal/charts/map/MapSankeyNodes.d.ts.map +1 -0
- package/.internal/charts/map/MapSankeyNodes.js +151 -0
- package/.internal/charts/map/MapSankeyNodes.js.map +1 -0
- package/.internal/charts/map/MapSankeySeries.d.ts +412 -0
- package/.internal/charts/map/MapSankeySeries.d.ts.map +1 -0
- package/.internal/charts/map/MapSankeySeries.js +868 -0
- package/.internal/charts/map/MapSankeySeries.js.map +1 -0
- package/.internal/core/Classes.d.ts +6 -0
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/util/Entity.d.ts.map +1 -1
- package/.internal/core/util/Entity.js +6 -0
- package/.internal/core/util/Entity.js.map +1 -1
- package/.internal/core/util/Math.d.ts +132 -49
- package/.internal/core/util/Math.d.ts.map +1 -1
- package/.internal/core/util/Math.js +151 -50
- package/.internal/core/util/Math.js.map +1 -1
- package/.internal/core/util/Object.d.ts +24 -1
- package/.internal/core/util/Object.d.ts.map +1 -1
- package/.internal/core/util/Object.js +24 -1
- package/.internal/core/util/Object.js.map +1 -1
- package/.internal/core/util/Utils.d.ts +69 -3
- package/.internal/core/util/Utils.d.ts.map +1 -1
- package/.internal/core/util/Utils.js +72 -18
- package/.internal/core/util/Utils.js.map +1 -1
- package/.internal/plugins/json/Classes-script.d.ts +6 -0
- package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
- package/.internal/plugins/json/Classes-script.js +3 -0
- package/.internal/plugins/json/Classes-script.js.map +1 -1
- package/.internal/plugins/json/Classes.d.ts +6 -0
- package/.internal/plugins/json/Classes.d.ts.map +1 -1
- package/.internal/plugins/json/Classes.js +3 -0
- package/.internal/plugins/json/Classes.js.map +1 -1
- package/CHANGELOG.md +23 -8
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gantt/package.json +1 -1
- package/examples/javascript/gantt-multilevel/package.json +1 -1
- package/examples/javascript/gantt-simple/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-clustered-points/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-sankey/README.md +6 -0
- package/examples/javascript/map-sankey/index.css +11 -0
- package/examples/javascript/map-sankey/index.html +13 -0
- package/examples/javascript/map-sankey/index.js +361 -0
- package/examples/javascript/map-sankey/package.json +17 -0
- package/examples/javascript/map-sankey/webpack.config.js +38 -0
- package/examples/javascript/map-sankey-waypoints/README.md +6 -0
- package/examples/javascript/map-sankey-waypoints/index.css +11 -0
- package/examples/javascript/map-sankey-waypoints/index.html +13 -0
- package/examples/javascript/map-sankey-waypoints/index.js +394 -0
- package/examples/javascript/map-sankey-waypoints/package.json +17 -0
- package/examples/javascript/map-sankey-waypoints/webpack.config.js +38 -0
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/timeline-horizontal-serpentine-chart/package.json +1 -1
- package/examples/javascript/timeline-linear-process-diagram/package.json +1 -1
- package/examples/javascript/timeline-serpentine-chart/package.json +1 -1
- package/examples/javascript/timeline-spiral-chart/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gantt/package.json +1 -1
- package/examples/typescript/gantt-multilevel/package.json +1 -1
- package/examples/typescript/gantt-simple/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-clustered-points/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-sankey/README.md +6 -0
- package/examples/typescript/map-sankey/index.css +11 -0
- package/examples/typescript/map-sankey/index.html +13 -0
- package/examples/typescript/map-sankey/index.ts +361 -0
- package/examples/typescript/map-sankey/package.json +19 -0
- package/examples/typescript/map-sankey/tsconfig.json +12 -0
- package/examples/typescript/map-sankey/webpack.config.js +45 -0
- package/examples/typescript/map-sankey-waypoints/README.md +6 -0
- package/examples/typescript/map-sankey-waypoints/index.css +11 -0
- package/examples/typescript/map-sankey-waypoints/index.html +13 -0
- package/examples/typescript/map-sankey-waypoints/index.ts +394 -0
- package/examples/typescript/map-sankey-waypoints/package.json +19 -0
- package/examples/typescript/map-sankey-waypoints/tsconfig.json +12 -0
- package/examples/typescript/map-sankey-waypoints/webpack.config.js +45 -0
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/timeline-horizontal-serpentine-chart/package.json +1 -1
- package/examples/typescript/timeline-linear-process-diagram/package.json +1 -1
- package/examples/typescript/timeline-serpentine-chart/package.json +1 -1
- package/examples/typescript/timeline-spiral-chart/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/map.d.ts +2 -0
- package/map.d.ts.map +1 -1
- package/map.js +2 -0
- package/map.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import type { DataItem } from "../../core/render/Component";
|
|
2
|
+
import type { Bullet } from "../../core/render/Bullet";
|
|
3
|
+
import type { IOrientationPoint } from "../../core/util/IPoint";
|
|
4
|
+
import type { IGeoPoint } from "../../core/util/IGeoPoint";
|
|
5
|
+
import { MapPolygonSeries, IMapPolygonSeriesSettings, IMapPolygonSeriesDataItem, IMapPolygonSeriesPrivate } from "./MapPolygonSeries";
|
|
6
|
+
import { MapSankeyNodes, IMapSankeyNodesDataItem } from "./MapSankeyNodes";
|
|
7
|
+
/**
|
|
8
|
+
* Parameters for a single cubic bezier segment in geographic coordinates.
|
|
9
|
+
* @ignore
|
|
10
|
+
*/
|
|
11
|
+
export interface IBezierSegment {
|
|
12
|
+
p0Lon: number;
|
|
13
|
+
p0Lat: number;
|
|
14
|
+
p1Lon: number;
|
|
15
|
+
p1Lat: number;
|
|
16
|
+
cp0Lon: number;
|
|
17
|
+
cp0Lat: number;
|
|
18
|
+
cp1Lon: number;
|
|
19
|
+
cp1Lat: number;
|
|
20
|
+
}
|
|
21
|
+
export interface IMapSankeySeriesPrivate extends IMapPolygonSeriesPrivate {
|
|
22
|
+
}
|
|
23
|
+
export interface IMapSankeySeriesDataItem extends IMapPolygonSeriesDataItem {
|
|
24
|
+
/**
|
|
25
|
+
* Source polygon ID (matches id in polygonSeries).
|
|
26
|
+
*/
|
|
27
|
+
sourceId?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Target polygon ID (matches id in polygonSeries).
|
|
30
|
+
*/
|
|
31
|
+
targetId?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Source longitude (if not using sourceId).
|
|
34
|
+
*/
|
|
35
|
+
sourceLongitude?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Source latitude (if not using sourceId).
|
|
38
|
+
*/
|
|
39
|
+
sourceLatitude?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Target longitude (if not using targetId).
|
|
42
|
+
*/
|
|
43
|
+
targetLongitude?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Target latitude (if not using targetId).
|
|
46
|
+
*/
|
|
47
|
+
targetLatitude?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Numeric value controlling band thickness.
|
|
50
|
+
*/
|
|
51
|
+
value?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Waypoints for routing the band through intermediate geographic points.
|
|
54
|
+
*/
|
|
55
|
+
waypoints?: Array<IGeoPoint>;
|
|
56
|
+
/**
|
|
57
|
+
* Per-link control point distance. Overrides series-level `controlPointDistance`.
|
|
58
|
+
*/
|
|
59
|
+
controlPointDistance?: number;
|
|
60
|
+
/**
|
|
61
|
+
* Per-link control point distance at the source end.
|
|
62
|
+
* Overrides series-level `controlPointDistanceSource`.
|
|
63
|
+
*/
|
|
64
|
+
controlPointDistanceSource?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Per-link control point distance at the target end.
|
|
67
|
+
* Overrides series-level `controlPointDistanceTarget`.
|
|
68
|
+
*/
|
|
69
|
+
controlPointDistanceTarget?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Reference to the source node data item.
|
|
72
|
+
* @readonly
|
|
73
|
+
*/
|
|
74
|
+
sourceNode?: DataItem<IMapSankeyNodesDataItem>;
|
|
75
|
+
/**
|
|
76
|
+
* Reference to the target node data item.
|
|
77
|
+
* @readonly
|
|
78
|
+
*/
|
|
79
|
+
targetNode?: DataItem<IMapSankeyNodesDataItem>;
|
|
80
|
+
}
|
|
81
|
+
export interface IMapSankeySeriesSettings extends IMapPolygonSeriesSettings {
|
|
82
|
+
/**
|
|
83
|
+
* A [[MapPolygonSeries]] to use for resolving `sourceId`/`targetId` to geographic centroids.
|
|
84
|
+
*/
|
|
85
|
+
polygonSeries?: MapPolygonSeries;
|
|
86
|
+
/**
|
|
87
|
+
* Control point distance for bezier curves (0-0.5). Higher values =
|
|
88
|
+
* longer straight sections before the S-curve transition.
|
|
89
|
+
*
|
|
90
|
+
* Used as fallback when `controlPointDistanceSource` or
|
|
91
|
+
* `controlPointDistanceTarget` are not set.
|
|
92
|
+
*
|
|
93
|
+
* @default 0.5
|
|
94
|
+
*/
|
|
95
|
+
controlPointDistance?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Control point distance at the source (departure) end.
|
|
98
|
+
* Higher values = longer straight section leaving the source node.
|
|
99
|
+
*
|
|
100
|
+
* Falls back to `controlPointDistance` if not set.
|
|
101
|
+
*/
|
|
102
|
+
controlPointDistanceSource?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Control point distance at the target (arrival) end.
|
|
105
|
+
* Higher values = longer straight section approaching the target node.
|
|
106
|
+
*
|
|
107
|
+
* Falls back to `controlPointDistance` if not set.
|
|
108
|
+
*/
|
|
109
|
+
controlPointDistanceTarget?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Orientation of the S-curve links.
|
|
112
|
+
*
|
|
113
|
+
* `"horizontal"` — links depart and arrive horizontally (east/west).
|
|
114
|
+
* Bands stack vertically at each endpoint.
|
|
115
|
+
* `"vertical"` — links depart and arrive vertically (north/south).
|
|
116
|
+
* Bands stack horizontally at each endpoint.
|
|
117
|
+
*
|
|
118
|
+
* @default "horizontal"
|
|
119
|
+
*/
|
|
120
|
+
orientation?: "horizontal" | "vertical";
|
|
121
|
+
/**
|
|
122
|
+
* Maximum band width in geographic degrees.
|
|
123
|
+
* @default 5
|
|
124
|
+
*/
|
|
125
|
+
maxWidth?: number;
|
|
126
|
+
/**
|
|
127
|
+
* Number of sample points per bezier segment. Higher = smoother curves.
|
|
128
|
+
* @default 50
|
|
129
|
+
*/
|
|
130
|
+
resolution?: number;
|
|
131
|
+
/**
|
|
132
|
+
* Extra padding added to endpoint nodes in geographic degrees.
|
|
133
|
+
* For circles, added to the radius. For bars, added to the half-height.
|
|
134
|
+
* Helps avoid subpixel gaps between bands and the node shape.
|
|
135
|
+
* @default 0.3
|
|
136
|
+
*/
|
|
137
|
+
nodePadding?: number;
|
|
138
|
+
/**
|
|
139
|
+
* When `true`, bands at each endpoint are sorted by the latitude of
|
|
140
|
+
* their target/source so that bands heading north are stacked above
|
|
141
|
+
* bands heading south. This prevents bands from overlapping.
|
|
142
|
+
* @default true
|
|
143
|
+
*/
|
|
144
|
+
autoSort?: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Controls how links handle the antimeridian (±180° longitude).
|
|
147
|
+
*
|
|
148
|
+
* `"short"` — links always take the shorter path, crossing the
|
|
149
|
+
* antimeridian if needed (e.g. China → US goes east across the Pacific).
|
|
150
|
+
* `"long"` — links never cross the antimeridian, always going the
|
|
151
|
+
* long way around.
|
|
152
|
+
*
|
|
153
|
+
* Only applies to links without waypoints; waypoints define the
|
|
154
|
+
* route explicitly.
|
|
155
|
+
*
|
|
156
|
+
* @default "short"
|
|
157
|
+
*/
|
|
158
|
+
antimeridian?: "short" | "long";
|
|
159
|
+
/**
|
|
160
|
+
* Shape of the endpoint node. Styled via `nodes.mapPolygons.template`.
|
|
161
|
+
*
|
|
162
|
+
* `"circle"` — a circle covering all flows at the endpoint.
|
|
163
|
+
* `"bar"` — a rectangular bar like in a traditional Sankey diagram.
|
|
164
|
+
* Bar orientation is perpendicular to the flow direction.
|
|
165
|
+
*
|
|
166
|
+
* @default "circle"
|
|
167
|
+
*/
|
|
168
|
+
nodeType?: "circle" | "bar";
|
|
169
|
+
/**
|
|
170
|
+
* Width of the bar at endpoint nodes in geographic degrees.
|
|
171
|
+
* Only used when `nodeType` is `"bar"`.
|
|
172
|
+
* @default 1
|
|
173
|
+
*/
|
|
174
|
+
nodeWidth?: number;
|
|
175
|
+
/**
|
|
176
|
+
* Controls how link bands are colored.
|
|
177
|
+
*
|
|
178
|
+
* `"solid"` — all links use the template fill (default).
|
|
179
|
+
* `"source"` — each link inherits the source node's fill.
|
|
180
|
+
* `"target"` — each link inherits the target node's fill.
|
|
181
|
+
*
|
|
182
|
+
* @default "solid"
|
|
183
|
+
*/
|
|
184
|
+
linkColorMode?: "solid" | "source" | "target";
|
|
185
|
+
/**
|
|
186
|
+
* A field in data that holds the source polygon ID.
|
|
187
|
+
* @default "sourceId"
|
|
188
|
+
*/
|
|
189
|
+
sourceIdField?: string;
|
|
190
|
+
/**
|
|
191
|
+
* A field in data that holds the target polygon ID.
|
|
192
|
+
* @default "targetId"
|
|
193
|
+
*/
|
|
194
|
+
targetIdField?: string;
|
|
195
|
+
/**
|
|
196
|
+
* A field in data that holds the source longitude.
|
|
197
|
+
* @default "sourceLongitude"
|
|
198
|
+
*/
|
|
199
|
+
sourceLongitudeField?: string;
|
|
200
|
+
/**
|
|
201
|
+
* A field in data that holds the source latitude.
|
|
202
|
+
* @default "sourceLatitude"
|
|
203
|
+
*/
|
|
204
|
+
sourceLatitudeField?: string;
|
|
205
|
+
/**
|
|
206
|
+
* A field in data that holds the target longitude.
|
|
207
|
+
* @default "targetLongitude"
|
|
208
|
+
*/
|
|
209
|
+
targetLongitudeField?: string;
|
|
210
|
+
/**
|
|
211
|
+
* A field in data that holds the target latitude.
|
|
212
|
+
* @default "targetLatitude"
|
|
213
|
+
*/
|
|
214
|
+
targetLatitudeField?: string;
|
|
215
|
+
/**
|
|
216
|
+
* A field in data that holds the waypoints array.
|
|
217
|
+
* @default "waypoints"
|
|
218
|
+
*/
|
|
219
|
+
waypointsField?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Creates a map series for displaying Sankey-style flow bands on a map.
|
|
223
|
+
*
|
|
224
|
+
* Generates actual GeoJSON polygon geometries for each flow, so they
|
|
225
|
+
* properly follow the map projection during panning, zooming, and rotation.
|
|
226
|
+
*
|
|
227
|
+
* @see {@link https://www.amcharts.com/docs/v5/charts/map-chart/map-sankey-series/} for more info
|
|
228
|
+
* @since 5.17.0
|
|
229
|
+
* @important
|
|
230
|
+
*/
|
|
231
|
+
export declare class MapSankeySeries extends MapPolygonSeries {
|
|
232
|
+
/**
|
|
233
|
+
* Don't consume polygon features from geodata - our data comes from user's data array.
|
|
234
|
+
*/
|
|
235
|
+
protected _types: Array<GeoJSON.GeoJsonGeometryTypes>;
|
|
236
|
+
/**
|
|
237
|
+
* A sub-series that manages node data items and visuals.
|
|
238
|
+
*
|
|
239
|
+
* Nodes are auto-created from link data. You can also set
|
|
240
|
+
* `nodes.data.setAll([...])` with custom names and fills.
|
|
241
|
+
*
|
|
242
|
+
* `nodes.mapPolygons.template` configures node appearance.
|
|
243
|
+
*/
|
|
244
|
+
readonly nodes: MapSankeyNodes;
|
|
245
|
+
/**
|
|
246
|
+
* Stored bezier segment params per data item for bullet positioning.
|
|
247
|
+
* Each link can have multiple segments (when waypoints are used).
|
|
248
|
+
* @ignore
|
|
249
|
+
*/
|
|
250
|
+
_bezierSegments: Map<DataItem<IMapSankeySeriesDataItem>, Array<IBezierSegment>>;
|
|
251
|
+
/**
|
|
252
|
+
* Cumulative arc-length array per data item for uniform-speed bullet positioning.
|
|
253
|
+
* Entry i = cumulative length from segment 0 through segment i.
|
|
254
|
+
* Last entry = total path length.
|
|
255
|
+
* @ignore
|
|
256
|
+
*/
|
|
257
|
+
_segmentCumulativeLengths: Map<DataItem<IMapSankeySeriesDataItem>, number[]>;
|
|
258
|
+
private _geoSourceCoords;
|
|
259
|
+
private _geoTargetCoords;
|
|
260
|
+
private _geoWidths;
|
|
261
|
+
private _geoSourceGroups;
|
|
262
|
+
private _geoTargetGroups;
|
|
263
|
+
private _geoNodeSourceTotal;
|
|
264
|
+
private _geoNodeTargetTotal;
|
|
265
|
+
private _geoNodeRange;
|
|
266
|
+
private _geoSourceOffsets;
|
|
267
|
+
private _geoTargetOffsets;
|
|
268
|
+
/**
|
|
269
|
+
* Disposer for the polygonSeries `datavalidated` listener. Re-attached
|
|
270
|
+
* whenever the `polygonSeries` setting changes.
|
|
271
|
+
*/
|
|
272
|
+
private _polygonSeriesDP?;
|
|
273
|
+
/**
|
|
274
|
+
* @ignore
|
|
275
|
+
*/
|
|
276
|
+
protected _afterNew(): void;
|
|
277
|
+
/**
|
|
278
|
+
* (Re)subscribes to the current `polygonSeries` `datavalidated` event so
|
|
279
|
+
* that any data items added before the polygon series finished loading
|
|
280
|
+
* its geoJSON get their endpoints resolved automatically.
|
|
281
|
+
*/
|
|
282
|
+
private _setupPolygonSeriesListener;
|
|
283
|
+
/**
|
|
284
|
+
* Walks all data items and resolves any whose source/target endpoints
|
|
285
|
+
* weren't resolved during the initial `processDataItem` call (because
|
|
286
|
+
* the polygon series wasn't ready yet). Marks values dirty so the
|
|
287
|
+
* geometries get regenerated.
|
|
288
|
+
*/
|
|
289
|
+
private _resolvePendingDataItems;
|
|
290
|
+
static className: string;
|
|
291
|
+
static classNames: Array<string>;
|
|
292
|
+
_settings: IMapSankeySeriesSettings;
|
|
293
|
+
_privateSettings: IMapSankeySeriesPrivate;
|
|
294
|
+
_dataItemSettings: IMapSankeySeriesDataItem;
|
|
295
|
+
/**
|
|
296
|
+
* @ignore
|
|
297
|
+
*/
|
|
298
|
+
markDirtyProjection(): void;
|
|
299
|
+
/**
|
|
300
|
+
* Evaluate a single bezier segment at parameter t.
|
|
301
|
+
*
|
|
302
|
+
* Same formula as $math.getPointOnCubicCurve but operates on flat
|
|
303
|
+
* IBezierSegment fields (lon/lat) to avoid IPoint object allocation.
|
|
304
|
+
*/
|
|
305
|
+
protected _evalBezier(bp: IBezierSegment, t: number): IGeoPoint;
|
|
306
|
+
/**
|
|
307
|
+
* Approximates the arc length of a single bezier segment by sampling
|
|
308
|
+
* points along the curve and summing Haversine distances.
|
|
309
|
+
*
|
|
310
|
+
* @param bp Bezier segment parameters
|
|
311
|
+
* @param samples Number of sample intervals (default 20)
|
|
312
|
+
* @return Approximate arc length in radians
|
|
313
|
+
*/
|
|
314
|
+
protected _segmentArcLength(bp: IBezierSegment, samples?: number): number;
|
|
315
|
+
/**
|
|
316
|
+
* Computes cumulative arc lengths for a set of bezier segments and
|
|
317
|
+
* stores them in `_segmentCumulativeLengths` for arc-length parameterization.
|
|
318
|
+
*
|
|
319
|
+
* @param dataItem Link data item (used as cache key)
|
|
320
|
+
* @param segments Array of bezier segment parameters
|
|
321
|
+
*/
|
|
322
|
+
protected _computeCumulativeLengths(dataItem: DataItem<IMapSankeySeriesDataItem>, segments: Array<IBezierSegment>): void;
|
|
323
|
+
/**
|
|
324
|
+
* Resolves a normalized location (0–1) to a segment index and local t
|
|
325
|
+
* using arc-length parameterization. Delegates to `$math.resolveLocationOnPath`
|
|
326
|
+
* when cumulative lengths are available; falls back to equal distribution.
|
|
327
|
+
*
|
|
328
|
+
* @param dataItem Link data item (for cumulative length lookup)
|
|
329
|
+
* @param location Relative position along the full path (0–1)
|
|
330
|
+
* @param segments Array of bezier segment parameters (used for fallback)
|
|
331
|
+
* @return Segment index and local t (0–1)
|
|
332
|
+
*/
|
|
333
|
+
protected _resolveLocation(dataItem: DataItem<IMapSankeySeriesDataItem>, location: number, segments: Array<IBezierSegment>): {
|
|
334
|
+
segIdx: number;
|
|
335
|
+
t: number;
|
|
336
|
+
};
|
|
337
|
+
/**
|
|
338
|
+
* Returns a screen-space point at a relative position (0-1) along
|
|
339
|
+
* the center-line bezier for the given data item.
|
|
340
|
+
*
|
|
341
|
+
* Used internally for bullet positioning, but can also be called
|
|
342
|
+
* directly to get coordinates along a flow path.
|
|
343
|
+
*
|
|
344
|
+
* @param dataItem Target data item
|
|
345
|
+
* @param location Relative position (0 = source, 1 = target)
|
|
346
|
+
* @return Screen coordinates and angle
|
|
347
|
+
*/
|
|
348
|
+
getPoint(dataItem: DataItem<IMapSankeySeriesDataItem>, location: number): IOrientationPoint;
|
|
349
|
+
/**
|
|
350
|
+
* Returns a geo point at a relative position (0-1) along the center-line bezier.
|
|
351
|
+
*/
|
|
352
|
+
getGeoPoint(dataItem: DataItem<IMapSankeySeriesDataItem>, location: number): IGeoPoint | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* Returns the approximate arc length of the path for a data item.
|
|
355
|
+
* Useful for scaling animation duration proportionally to distance.
|
|
356
|
+
*/
|
|
357
|
+
getPathLength(dataItem: DataItem<IMapSankeySeriesDataItem>): number;
|
|
358
|
+
/**
|
|
359
|
+
* Combined getPoint + getGeoPoint in a single pass (avoids double
|
|
360
|
+
* _resolveLocation + _evalBezier per bullet per frame).
|
|
361
|
+
* @ignore
|
|
362
|
+
*/
|
|
363
|
+
private _getPointWithGeo;
|
|
364
|
+
/**
|
|
365
|
+
* Positions a bullet along its parent link's bezier path.
|
|
366
|
+
*
|
|
367
|
+
* @param bullet Bullet to position
|
|
368
|
+
*/
|
|
369
|
+
_positionBullet(bullet: Bullet): void;
|
|
370
|
+
/**
|
|
371
|
+
* @ignore
|
|
372
|
+
*/
|
|
373
|
+
disposeDataItem(dataItem: DataItem<this["_dataItemSettings"]>): void;
|
|
374
|
+
/**
|
|
375
|
+
* @ignore
|
|
376
|
+
*/
|
|
377
|
+
protected _dispose(): void;
|
|
378
|
+
/**
|
|
379
|
+
* Processes a newly added data item, creating placeholder geometry and
|
|
380
|
+
* registering it with source/target nodes.
|
|
381
|
+
*
|
|
382
|
+
* @param dataItem Data item to process
|
|
383
|
+
*/
|
|
384
|
+
protected processDataItem(dataItem: DataItem<this["_dataItemSettings"]>): void;
|
|
385
|
+
/**
|
|
386
|
+
* Resolves the source/target endpoints for a single data item:
|
|
387
|
+
* looks up centroids on the polygon series (if `sourceId`/`targetId` is set),
|
|
388
|
+
* then creates or attaches the appropriate sankey nodes.
|
|
389
|
+
*
|
|
390
|
+
* Returns `true` if anything was newly resolved, so callers can decide
|
|
391
|
+
* whether to mark geometries dirty.
|
|
392
|
+
*
|
|
393
|
+
* Safe to call repeatedly: skips endpoints that are already resolved.
|
|
394
|
+
*/
|
|
395
|
+
private _resolveEndpoints;
|
|
396
|
+
/**
|
|
397
|
+
* @ignore
|
|
398
|
+
*/
|
|
399
|
+
protected _onDataClear(): void;
|
|
400
|
+
/**
|
|
401
|
+
* @ignore
|
|
402
|
+
*/
|
|
403
|
+
_prepareChildren(): void;
|
|
404
|
+
/**
|
|
405
|
+
* Rebuilds all link band geometries from current data.
|
|
406
|
+
*
|
|
407
|
+
* Computes bezier control points, stacking offsets, band polygons,
|
|
408
|
+
* and cumulative arc lengths for each link.
|
|
409
|
+
*/
|
|
410
|
+
protected _generateGeometries(): void;
|
|
411
|
+
}
|
|
412
|
+
//# sourceMappingURL=MapSankeySeries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapSankeySeries.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/charts/map/MapSankeySeries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAG3D,OAAO,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACtI,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAO3E;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,M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