@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.
Files changed (227) hide show
  1. package/.internal/charts/map/MapChartDefaultTheme.d.ts.map +1 -1
  2. package/.internal/charts/map/MapChartDefaultTheme.js +3 -0
  3. package/.internal/charts/map/MapChartDefaultTheme.js.map +1 -1
  4. package/.internal/charts/map/MapSankeyNodes.d.ts +155 -0
  5. package/.internal/charts/map/MapSankeyNodes.d.ts.map +1 -0
  6. package/.internal/charts/map/MapSankeyNodes.js +151 -0
  7. package/.internal/charts/map/MapSankeyNodes.js.map +1 -0
  8. package/.internal/charts/map/MapSankeySeries.d.ts +412 -0
  9. package/.internal/charts/map/MapSankeySeries.d.ts.map +1 -0
  10. package/.internal/charts/map/MapSankeySeries.js +868 -0
  11. package/.internal/charts/map/MapSankeySeries.js.map +1 -0
  12. package/.internal/core/Classes.d.ts +6 -0
  13. package/.internal/core/Classes.d.ts.map +1 -1
  14. package/.internal/core/Classes.js.map +1 -1
  15. package/.internal/core/Registry.js +1 -1
  16. package/.internal/core/Registry.js.map +1 -1
  17. package/.internal/core/util/Entity.d.ts.map +1 -1
  18. package/.internal/core/util/Entity.js +6 -0
  19. package/.internal/core/util/Entity.js.map +1 -1
  20. package/.internal/core/util/Math.d.ts +132 -49
  21. package/.internal/core/util/Math.d.ts.map +1 -1
  22. package/.internal/core/util/Math.js +151 -50
  23. package/.internal/core/util/Math.js.map +1 -1
  24. package/.internal/core/util/Object.d.ts +24 -1
  25. package/.internal/core/util/Object.d.ts.map +1 -1
  26. package/.internal/core/util/Object.js +24 -1
  27. package/.internal/core/util/Object.js.map +1 -1
  28. package/.internal/core/util/Utils.d.ts +69 -3
  29. package/.internal/core/util/Utils.d.ts.map +1 -1
  30. package/.internal/core/util/Utils.js +72 -18
  31. package/.internal/core/util/Utils.js.map +1 -1
  32. package/.internal/plugins/json/Classes-script.d.ts +6 -0
  33. package/.internal/plugins/json/Classes-script.d.ts.map +1 -1
  34. package/.internal/plugins/json/Classes-script.js +3 -0
  35. package/.internal/plugins/json/Classes-script.js.map +1 -1
  36. package/.internal/plugins/json/Classes.d.ts +6 -0
  37. package/.internal/plugins/json/Classes.d.ts.map +1 -1
  38. package/.internal/plugins/json/Classes.js +3 -0
  39. package/.internal/plugins/json/Classes.js.map +1 -1
  40. package/CHANGELOG.md +23 -8
  41. package/examples/javascript/flow-arc-horizontal/package.json +1 -1
  42. package/examples/javascript/flow-arc-vertical/package.json +1 -1
  43. package/examples/javascript/flow-chord/package.json +1 -1
  44. package/examples/javascript/flow-chord-directed/package.json +1 -1
  45. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  46. package/examples/javascript/flow-sankey/package.json +1 -1
  47. package/examples/javascript/gantt/package.json +1 -1
  48. package/examples/javascript/gantt-multilevel/package.json +1 -1
  49. package/examples/javascript/gantt-simple/package.json +1 -1
  50. package/examples/javascript/gauge/package.json +1 -1
  51. package/examples/javascript/gauge-bands/package.json +1 -1
  52. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  53. package/examples/javascript/hierarchy-pack/package.json +1 -1
  54. package/examples/javascript/hierarchy-partition/package.json +1 -1
  55. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  56. package/examples/javascript/hierarchy-tree/package.json +1 -1
  57. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  58. package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
  59. package/examples/javascript/jest/package.json +1 -1
  60. package/examples/javascript/json-pie/package.json +1 -1
  61. package/examples/javascript/json-xy/package.json +1 -1
  62. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  63. package/examples/javascript/map-clustered-points/package.json +1 -1
  64. package/examples/javascript/map-day-and-night/package.json +1 -1
  65. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  66. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  67. package/examples/javascript/map-sankey/README.md +6 -0
  68. package/examples/javascript/map-sankey/index.css +11 -0
  69. package/examples/javascript/map-sankey/index.html +13 -0
  70. package/examples/javascript/map-sankey/index.js +361 -0
  71. package/examples/javascript/map-sankey/package.json +17 -0
  72. package/examples/javascript/map-sankey/webpack.config.js +38 -0
  73. package/examples/javascript/map-sankey-waypoints/README.md +6 -0
  74. package/examples/javascript/map-sankey-waypoints/index.css +11 -0
  75. package/examples/javascript/map-sankey-waypoints/index.html +13 -0
  76. package/examples/javascript/map-sankey-waypoints/index.js +394 -0
  77. package/examples/javascript/map-sankey-waypoints/package.json +17 -0
  78. package/examples/javascript/map-sankey-waypoints/webpack.config.js +38 -0
  79. package/examples/javascript/map-with-bubbles/package.json +1 -1
  80. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  81. package/examples/javascript/misc-40-charts/package.json +1 -1
  82. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  83. package/examples/javascript/pie-chart/package.json +1 -1
  84. package/examples/javascript/pie-donut-chart/package.json +1 -1
  85. package/examples/javascript/pie-variable-radius/package.json +1 -1
  86. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  87. package/examples/javascript/radar-heat-map/package.json +1 -1
  88. package/examples/javascript/radar-line/package.json +1 -1
  89. package/examples/javascript/radar-time-line/package.json +1 -1
  90. package/examples/javascript/sliced-funnel/package.json +1 -1
  91. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  92. package/examples/javascript/sliced-pyramid/package.json +1 -1
  93. package/examples/javascript/stock-chart/package.json +1 -1
  94. package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
  95. package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
  96. package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
  97. package/examples/javascript/stock-chart-intraday/package.json +1 -1
  98. package/examples/javascript/stock-chart-live/package.json +1 -1
  99. package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
  100. package/examples/javascript/timeline-horizontal-serpentine-chart/package.json +1 -1
  101. package/examples/javascript/timeline-linear-process-diagram/package.json +1 -1
  102. package/examples/javascript/timeline-serpentine-chart/package.json +1 -1
  103. package/examples/javascript/timeline-spiral-chart/package.json +1 -1
  104. package/examples/javascript/venn-diagram/package.json +1 -1
  105. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  106. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  107. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  108. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  109. package/examples/javascript/xy-bubble/package.json +1 -1
  110. package/examples/javascript/xy-candlestick/package.json +1 -1
  111. package/examples/javascript/xy-clustered-column/package.json +1 -1
  112. package/examples/javascript/xy-column/package.json +1 -1
  113. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  114. package/examples/javascript/xy-data-grouping/package.json +1 -1
  115. package/examples/javascript/xy-draggable-range/package.json +1 -1
  116. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  117. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  118. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  119. package/examples/javascript/xy-line/package.json +1 -1
  120. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  121. package/examples/javascript/xy-live-data/package.json +1 -1
  122. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  123. package/examples/javascript/xy-ohlc/package.json +1 -1
  124. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  125. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  126. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  127. package/examples/javascript/xy-stacked-column/package.json +1 -1
  128. package/examples/javascript/xy-stacked-step/package.json +1 -1
  129. package/examples/javascript/xy-stock/package.json +1 -1
  130. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  131. package/examples/typescript/flow-arc-horizontal/package.json +1 -1
  132. package/examples/typescript/flow-arc-vertical/package.json +1 -1
  133. package/examples/typescript/flow-chord/package.json +1 -1
  134. package/examples/typescript/flow-chord-directed/package.json +1 -1
  135. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  136. package/examples/typescript/flow-sankey/package.json +1 -1
  137. package/examples/typescript/gantt/package.json +1 -1
  138. package/examples/typescript/gantt-multilevel/package.json +1 -1
  139. package/examples/typescript/gantt-simple/package.json +1 -1
  140. package/examples/typescript/gauge/package.json +1 -1
  141. package/examples/typescript/gauge-bands/package.json +1 -1
  142. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  143. package/examples/typescript/hierarchy-pack/package.json +1 -1
  144. package/examples/typescript/hierarchy-partition/package.json +1 -1
  145. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  146. package/examples/typescript/hierarchy-tree/package.json +1 -1
  147. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  148. package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
  149. package/examples/typescript/jest/package.json +1 -1
  150. package/examples/typescript/json-pie/package.json +1 -1
  151. package/examples/typescript/json-xy/package.json +1 -1
  152. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  153. package/examples/typescript/map-clustered-points/package.json +1 -1
  154. package/examples/typescript/map-day-and-night/package.json +1 -1
  155. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  156. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  157. package/examples/typescript/map-sankey/README.md +6 -0
  158. package/examples/typescript/map-sankey/index.css +11 -0
  159. package/examples/typescript/map-sankey/index.html +13 -0
  160. package/examples/typescript/map-sankey/index.ts +361 -0
  161. package/examples/typescript/map-sankey/package.json +19 -0
  162. package/examples/typescript/map-sankey/tsconfig.json +12 -0
  163. package/examples/typescript/map-sankey/webpack.config.js +45 -0
  164. package/examples/typescript/map-sankey-waypoints/README.md +6 -0
  165. package/examples/typescript/map-sankey-waypoints/index.css +11 -0
  166. package/examples/typescript/map-sankey-waypoints/index.html +13 -0
  167. package/examples/typescript/map-sankey-waypoints/index.ts +394 -0
  168. package/examples/typescript/map-sankey-waypoints/package.json +19 -0
  169. package/examples/typescript/map-sankey-waypoints/tsconfig.json +12 -0
  170. package/examples/typescript/map-sankey-waypoints/webpack.config.js +45 -0
  171. package/examples/typescript/map-with-bubbles/package.json +1 -1
  172. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  173. package/examples/typescript/misc-40-charts/package.json +1 -1
  174. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  175. package/examples/typescript/pie-chart/package.json +1 -1
  176. package/examples/typescript/pie-donut-chart/package.json +1 -1
  177. package/examples/typescript/pie-variable-radius/package.json +1 -1
  178. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  179. package/examples/typescript/radar-heat-map/package.json +1 -1
  180. package/examples/typescript/radar-line/package.json +1 -1
  181. package/examples/typescript/radar-time-line/package.json +1 -1
  182. package/examples/typescript/sliced-funnel/package.json +1 -1
  183. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  184. package/examples/typescript/sliced-pyramid/package.json +1 -1
  185. package/examples/typescript/stock-chart/package.json +1 -1
  186. package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
  187. package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
  188. package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
  189. package/examples/typescript/stock-chart-intraday/package.json +1 -1
  190. package/examples/typescript/stock-chart-live/package.json +1 -1
  191. package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
  192. package/examples/typescript/timeline-horizontal-serpentine-chart/package.json +1 -1
  193. package/examples/typescript/timeline-linear-process-diagram/package.json +1 -1
  194. package/examples/typescript/timeline-serpentine-chart/package.json +1 -1
  195. package/examples/typescript/timeline-spiral-chart/package.json +1 -1
  196. package/examples/typescript/venn-diagram/package.json +1 -1
  197. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  198. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  199. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  200. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  201. package/examples/typescript/xy-bubble/package.json +1 -1
  202. package/examples/typescript/xy-candlestick/package.json +1 -1
  203. package/examples/typescript/xy-clustered-column/package.json +1 -1
  204. package/examples/typescript/xy-column/package.json +1 -1
  205. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  206. package/examples/typescript/xy-data-grouping/package.json +1 -1
  207. package/examples/typescript/xy-draggable-range/package.json +1 -1
  208. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  209. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  210. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  211. package/examples/typescript/xy-line/package.json +1 -1
  212. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  213. package/examples/typescript/xy-live-data/package.json +1 -1
  214. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  215. package/examples/typescript/xy-ohlc/package.json +1 -1
  216. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  217. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  218. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  219. package/examples/typescript/xy-stacked-column/package.json +1 -1
  220. package/examples/typescript/xy-stacked-step/package.json +1 -1
  221. package/examples/typescript/xy-stock/package.json +1 -1
  222. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  223. package/map.d.ts +2 -0
  224. package/map.d.ts.map +1 -1
  225. package/map.js +2 -0
  226. package/map.js.map +1 -1
  227. 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,MAAM,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;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