@amcharts/amcharts5-mcp 1.4.0 → 1.6.0

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 (333) hide show
  1. package/content/SKILL.md +135 -7
  2. package/content/flow.md +7 -0
  3. package/content/hierarchy.md +21 -0
  4. package/content/map.md +107 -9
  5. package/content/pie.md +22 -0
  6. package/content/radar.md +1 -1
  7. package/content/timeline.md +3 -3
  8. package/content/venn.md +6 -0
  9. package/content/wordcloud.md +2 -0
  10. package/content/xy.md +32 -2
  11. package/extended/charts/map-chart/map-line-series.md +110 -1
  12. package/extended/charts/map-chart/map-point-series.md +110 -1
  13. package/extended/charts/map-chart/map-polygon-series.md +47 -0
  14. package/extended/charts/xy-chart/axes/category-axis.md +2 -0
  15. package/extended/concepts/animations.md +136 -2
  16. package/extended/concepts/data.md +2 -0
  17. package/extended/concepts/events.md +14 -0
  18. package/extended/concepts/serializing/chart-serializer.md +64 -24
  19. package/extended/concepts/serializing.md +17 -0
  20. package/extended/concepts/settings/template-fields.md +24 -0
  21. package/extended/examples/candlestick-ohlc/box-plot-chart.md +78 -73
  22. package/extended/examples/candlestick-ohlc/candlestick-chart.md +2 -5
  23. package/extended/examples/candlestick-ohlc/ohlc-chart.md +3 -6
  24. package/extended/examples/candlestick-ohlc/on-demand-data-loading.md +7 -7
  25. package/extended/examples/candlestick-ohlc/professional-candlesticks.md +3 -6
  26. package/extended/examples/candlestick-ohlc/stock-chart-candlesticks.md +1 -1
  27. package/extended/examples/column-bar/100-stacked-column-chart.md +3 -3
  28. package/extended/examples/column-bar/bar-and-line-chart-mix.md +3 -12
  29. package/extended/examples/column-bar/bar-chart-race.md +4 -11
  30. package/extended/examples/column-bar/bars-with-moving-bullets.md +1 -1
  31. package/extended/examples/column-bar/bullet-chart.md +1 -1
  32. package/extended/examples/column-bar/carbon-zero-progress.md +2 -3
  33. package/extended/examples/column-bar/clustered-bar-chart.md +3 -13
  34. package/extended/examples/column-bar/clustered-column-chart.md +2 -2
  35. package/extended/examples/column-bar/column-and-line-mix.md +1 -1
  36. package/extended/examples/column-bar/column-chart-images-top.md +4 -10
  37. package/extended/examples/column-bar/column-with-rotated-series.md +4 -11
  38. package/extended/examples/column-bar/columns-with-grainy-gradients.md +4 -5
  39. package/extended/examples/column-bar/columns-with-moving-bullets.md +1 -1
  40. package/extended/examples/column-bar/curved-columns.md +4 -10
  41. package/extended/examples/column-bar/divergent-stacked-bars.md +1 -10
  42. package/extended/examples/column-bar/drag-and-change-column-value.md +4 -11
  43. package/extended/examples/column-bar/drag-ordering-of-bars.md +1 -1
  44. package/extended/examples/column-bar/dumbbell-plot.md +1 -1
  45. package/extended/examples/column-bar/floating-bar-chart.md +2 -3
  46. package/extended/examples/column-bar/grouped-and-sorted-columns.md +4 -10
  47. package/extended/examples/column-bar/grouped-stacks.md +1 -1
  48. package/extended/examples/column-bar/heat-map-with-legend.md +8 -8
  49. package/extended/examples/column-bar/horizontal-dumbbell-plot.md +1 -1
  50. package/extended/examples/column-bar/images-as-categories.md +16 -18
  51. package/extended/examples/column-bar/layered-column-chart.md +1 -1
  52. package/extended/examples/column-bar/lollipop-chart.md +1 -1
  53. package/extended/examples/column-bar/pareto-diagram.md +4 -7
  54. package/extended/examples/column-bar/partitioned-bar-chart.md +1 -1
  55. package/extended/examples/column-bar/pictorial-column-chart.md +1 -1
  56. package/extended/examples/column-bar/real-time-data-sorting.md +4 -11
  57. package/extended/examples/column-bar/risk-heatmap.md +9 -9
  58. package/extended/examples/column-bar/simple-column-chart.md +3 -3
  59. package/extended/examples/column-bar/sorted-bar-chart.md +4 -12
  60. package/extended/examples/column-bar/stacked-bar-chart-with-negative-values.md +1 -1
  61. package/extended/examples/column-bar/stacked-bar-chart.md +1 -1
  62. package/extended/examples/column-bar/stacked-clustered-column-chart.md +1 -1
  63. package/extended/examples/column-bar/stacked-column-chart.md +1 -1
  64. package/extended/examples/column-bar/stacked-waterfall-chart.md +1 -1
  65. package/extended/examples/column-bar/step-count-chart.md +1 -1
  66. package/extended/examples/column-bar/variance-indicators.md +1 -1
  67. package/extended/examples/column-bar/waffle-chart.md +1 -1
  68. package/extended/examples/column-bar/waterfall-chart.md +1 -1
  69. package/extended/examples/dashboards/maps-and-charts-dashboard.md +1 -1
  70. package/extended/examples/dashboards/road-trip-dashboard-with-map.md +24 -23
  71. package/extended/examples/flow/animated-sankey-diagram.md +200 -202
  72. package/extended/examples/flow/chord-diagram-with-animated-bullets.md +4 -2
  73. package/extended/examples/flow/chord-diagram.md +6 -4
  74. package/extended/examples/flow/horizontal-arc-diagram.md +4 -2
  75. package/extended/examples/flow/non-ribbon-chord-diagram.md +6 -4
  76. package/extended/examples/flow/sankey-diagram.md +4 -2
  77. package/extended/examples/flow/toggleable-chord-diagram.md +4 -2
  78. package/extended/examples/flow/traceable-sankey-diagram.md +4 -2
  79. package/extended/examples/flow/vertical-arc-diagram.md +4 -2
  80. package/extended/examples/flow/vertical-sankey-diagram.md +11 -19
  81. package/extended/examples/funnel-pyramid/funnel-chart-with-rounded-corners.md +1 -1
  82. package/extended/examples/funnel-pyramid/funnel-chart.md +1 -1
  83. package/extended/examples/funnel-pyramid/funnel-with-gradient-fill.md +1 -1
  84. package/extended/examples/funnel-pyramid/horizontal-funnel.md +1 -1
  85. package/extended/examples/funnel-pyramid/horizontal-pictorial-chart.md +1 -1
  86. package/extended/examples/funnel-pyramid/pictorial-chart.md +1 -1
  87. package/extended/examples/funnel-pyramid/pictorial-fraction-chart.md +1 -1
  88. package/extended/examples/funnel-pyramid/pictorial-stacked-chart.md +1 -1
  89. package/extended/examples/funnel-pyramid/pyramid-chart.md +1 -1
  90. package/extended/examples/gantt/editable-multilevel-gantt-chart.md +1 -1
  91. package/extended/examples/gantt/gantt-chart-dates.md +1 -1
  92. package/extended/examples/gantt/gantt-chart-in-read-only-mode.md +1 -1
  93. package/extended/examples/gantt/gantt-chart-playground.md +4 -3
  94. package/extended/examples/gantt/gantt-chart.md +1 -1
  95. package/extended/examples/gantt/gantt-with-hundreds-of-items.md +1 -1
  96. package/extended/examples/gauges/angular-gauge-with-two-axes.md +1 -1
  97. package/extended/examples/gauges/angular-gauge.md +1 -1
  98. package/extended/examples/gauges/animated-gauge.md +1 -1
  99. package/extended/examples/gauges/clock-with-two-faces.md +1 -1
  100. package/extended/examples/gauges/clock.md +1 -1
  101. package/extended/examples/gauges/compass-chart.md +1 -1
  102. package/extended/examples/gauges/gauge-with-bands.md +1 -1
  103. package/extended/examples/gauges/gauge-with-gradient-fill.md +1 -1
  104. package/extended/examples/gauges/multi-part-gauge.md +1 -1
  105. package/extended/examples/gauges/solid-gauge.md +1 -1
  106. package/extended/examples/gauges/yes-and-no-gauge.md +1 -1
  107. package/extended/examples/hierarchy/collapsible-force-directed-tree.md +3 -3
  108. package/extended/examples/hierarchy/drill-down-sunburst-chart.md +4 -4
  109. package/extended/examples/hierarchy/drill-down-treemap.md +5 -5
  110. package/extended/examples/hierarchy/dynamic-data-updates-on-treemap.md +4 -4
  111. package/extended/examples/hierarchy/force-directed-adding-links.md +4 -4
  112. package/extended/examples/hierarchy/force-directed-network.md +4 -4
  113. package/extended/examples/hierarchy/force-directed-tree-with-animated-bullets.md +11 -10
  114. package/extended/examples/hierarchy/force-directed-tree.md +3 -3
  115. package/extended/examples/hierarchy/horizontal-partition-chart.md +3 -3
  116. package/extended/examples/hierarchy/multilevel-tree-map.md +11 -10
  117. package/extended/examples/hierarchy/packed-circle-chart.md +3 -3
  118. package/extended/examples/hierarchy/rectangular-voronoi-tree-map.md +4 -2
  119. package/extended/examples/hierarchy/simple-treemap.md +4 -4
  120. package/extended/examples/hierarchy/single-level-packed-circles.md +11 -10
  121. package/extended/examples/hierarchy/sunburst-chart.md +3 -3
  122. package/extended/examples/hierarchy/sunburst-flavor-wheel.md +18 -21
  123. package/extended/examples/hierarchy/tree-chart.md +11 -10
  124. package/extended/examples/hierarchy/vertical-partition-chart.md +3 -3
  125. package/extended/examples/hierarchy/voronoi-treemap.md +11 -10
  126. package/extended/examples/hierarchy/zoomable-force-directed-tree.md +11 -10
  127. package/extended/examples/line-area/100-stacked-area-chart.md +3 -4
  128. package/extended/examples/line-area/animated-bullet-at-the-end-of-the-series.md +1 -1
  129. package/extended/examples/line-area/area-with-time-based-data.md +2 -3
  130. package/extended/examples/line-area/chart-with-gaps-in-data.md +2 -3
  131. package/extended/examples/line-area/comparing-different-date-values-google-analytics-style.md +2 -3
  132. package/extended/examples/line-area/control-chart.md +1 -1
  133. package/extended/examples/line-area/data-grouping-50k-points.md +1 -2
  134. package/extended/examples/line-area/date-axis-with-labels-near-minor-grid-lines.md +1 -1
  135. package/extended/examples/line-area/date-based-data.md +1 -1
  136. package/extended/examples/line-area/date-based-line-chart.md +4 -4
  137. package/extended/examples/line-area/divergent-lines.md +2 -3
  138. package/extended/examples/line-area/draggable-range-with-close-button.md +1 -1
  139. package/extended/examples/line-area/drawing-chart-series-with-mouse-or-touch.md +1 -1
  140. package/extended/examples/line-area/duration-on-value-axis.md +8 -8
  141. package/extended/examples/line-area/error-chart.md +2 -3
  142. package/extended/examples/line-area/evenly-spaced-date-axis.md +1 -1
  143. package/extended/examples/line-area/highlighting-line-chart-series-on-legend-hover.md +1 -1
  144. package/extended/examples/line-area/line-chart-adding-data-every-second.md +1 -1
  145. package/extended/examples/line-area/line-chart-with-horizontal-target.md +1 -1
  146. package/extended/examples/line-area/line-chart-with-range-slider.md +1 -1
  147. package/extended/examples/line-area/line-chart-with-scroll-and-zoom.md +1 -1
  148. package/extended/examples/line-area/line-different-colors-ups-downs.md +1 -1
  149. package/extended/examples/line-area/line-graph.md +1 -1
  150. package/extended/examples/line-area/line-with-changing-color.md +1 -1
  151. package/extended/examples/line-area/line-with-custom-bullets.md +21 -18
  152. package/extended/examples/line-area/line-with-data-labels.md +1 -1
  153. package/extended/examples/line-area/live-data.md +1 -1
  154. package/extended/examples/line-area/live-order-book-depth-chart.md +9 -15
  155. package/extended/examples/line-area/logarithmic-scale.md +1 -1
  156. package/extended/examples/line-area/manipulate-chart-data-with-mouse.md +1 -1
  157. package/extended/examples/line-area/mixed-daily-and-intra-day-chart.md +1 -1
  158. package/extended/examples/line-area/multiple-date-axes.md +1 -1
  159. package/extended/examples/line-area/multiple-value-axes.md +1 -1
  160. package/extended/examples/line-area/no-gap-date-axis.md +1 -1
  161. package/extended/examples/line-area/process-control-chart.md +1 -1
  162. package/extended/examples/line-area/range-area-chart.md +1 -1
  163. package/extended/examples/line-area/range-chart-with-different-fill-colors.md +2 -2
  164. package/extended/examples/line-area/reversed-value-axis.md +2 -3
  165. package/extended/examples/line-area/selecting-and-marking-multiple-ranges.md +1 -2
  166. package/extended/examples/line-area/show-percentage-change.md +1 -1
  167. package/extended/examples/line-area/smoothed-line-chart.md +1 -1
  168. package/extended/examples/line-area/smoothed-stacked-area.md +2 -3
  169. package/extended/examples/line-area/spline-graph.md +1 -1
  170. package/extended/examples/line-area/stacked-area.md +2 -3
  171. package/extended/examples/line-area/step-line-chart.md +1 -1
  172. package/extended/examples/line-area/step-line-without-risers.md +1 -1
  173. package/extended/examples/line-area/stream-chart.md +2 -3
  174. package/extended/examples/line-area/trend-lines.md +1 -1
  175. package/extended/examples/line-area/vertical-line-chart.md +1 -1
  176. package/extended/examples/line-area/zoomable-value-axis.md +6 -6
  177. package/extended/examples/maps/animations-along-lines.md +34 -28
  178. package/extended/examples/maps/approximate-working-hours-map.md +9 -1
  179. package/extended/examples/maps/capitals-map.md +363 -911
  180. package/extended/examples/maps/changing-map-projection.md +7 -6
  181. package/extended/examples/maps/day-and-night-world-map.md +172 -532
  182. package/extended/examples/maps/drill-down-congressional-map.md +2 -2
  183. package/extended/examples/maps/drill-down-map.md +4 -4
  184. package/extended/examples/maps/drill-down-to-countries.md +6 -6
  185. package/extended/examples/maps/flight-routes-map.md +9 -1
  186. package/extended/examples/maps/grouped-countries-map.md +2 -3
  187. package/extended/examples/maps/location-sensitive-map.md +2 -1
  188. package/extended/examples/maps/map-bubbles.md +11 -3
  189. package/extended/examples/maps/map-dynamic-pie-charts.md +1 -1
  190. package/extended/examples/maps/map-image-drill-down.md +14 -15
  191. package/extended/examples/maps/map-sankey-series.md +22 -0
  192. package/extended/examples/maps/map-timeline.md +1 -1
  193. package/extended/examples/maps/map-using-d3-projections.md +1 -1
  194. package/extended/examples/maps/map-with-animated-bubbles.md +4 -2
  195. package/extended/examples/maps/map-with-animated-lines.md +38 -26
  196. package/extended/examples/maps/map-with-curved-lines.md +35 -25
  197. package/extended/examples/maps/map-with-patterns.md +9 -4
  198. package/extended/examples/maps/map-with-pulsating-bullets.md +9 -13
  199. package/extended/examples/maps/map-with-sized-pin-bullets.md +1 -1
  200. package/extended/examples/maps/multi-series-map.md +5 -4
  201. package/extended/examples/maps/pacific-centered-map.md +2 -1
  202. package/extended/examples/maps/rotate-globe-to-a-selected-country.md +200 -29
  203. package/extended/examples/maps/rotating-globe-with-circles.md +19 -2
  204. package/extended/examples/maps/rotating-globe.md +77 -20
  205. package/extended/examples/maps/selecting-multiple-areas-map.md +1 -1
  206. package/extended/examples/maps/solar-eclipse-map.md +12 -7
  207. package/extended/examples/maps/trumps-reciprocal-tariffs-map.md +1 -1
  208. package/extended/examples/maps/us-congressional-districts.md +19 -10
  209. package/extended/examples/maps/us-heat-map.md +1 -1
  210. package/extended/examples/maps/weather-map.md +1 -1
  211. package/extended/examples/maps/world-map-with-clustered-points.md +2 -1
  212. package/extended/examples/maps/world-time-zone-map.md +2 -1
  213. package/extended/examples/maps/zooming-to-countries-map.md +91 -15
  214. package/extended/examples/miscellaneous/annotating-charts.md +3 -3
  215. package/extended/examples/miscellaneous/changing-data-word-cloud.md +4 -2
  216. package/extended/examples/miscellaneous/combined-bullet-column-line-chart.md +1 -1
  217. package/extended/examples/miscellaneous/complex-venn-diagram.md +9 -22
  218. package/extended/examples/miscellaneous/exporting-chart-to-image.md +1 -1
  219. package/extended/examples/miscellaneous/forest-plot.md +5 -5
  220. package/extended/examples/miscellaneous/historical-population-pyramid.md +2 -4
  221. package/extended/examples/miscellaneous/honeycomb-tile-map.md +1 -1
  222. package/extended/examples/miscellaneous/horizontally-stacked-axes.md +1 -1
  223. package/extended/examples/miscellaneous/hybrid-drill-down-pie-bar-chart.md +4 -4
  224. package/extended/examples/miscellaneous/infographic.md +1 -1
  225. package/extended/examples/miscellaneous/mekko.md +1 -1
  226. package/extended/examples/miscellaneous/micro-charts-sparklines.md +1 -1
  227. package/extended/examples/miscellaneous/pictogram.md +3 -5
  228. package/extended/examples/miscellaneous/population-pyramid.md +1 -1
  229. package/extended/examples/miscellaneous/progress-chart.md +2 -2
  230. package/extended/examples/miscellaneous/range-bullet-chart.md +1 -1
  231. package/extended/examples/miscellaneous/sentence-cloud.md +10 -19
  232. package/extended/examples/miscellaneous/spectrum-chart.md +4 -4
  233. package/extended/examples/miscellaneous/strip-plot.md +1 -1
  234. package/extended/examples/miscellaneous/tag-cloud.md +5 -4
  235. package/extended/examples/miscellaneous/tile-map.md +1 -1
  236. package/extended/examples/miscellaneous/venn-diagram-with-patterns.md +8 -8
  237. package/extended/examples/miscellaneous/venn-diagram.md +8 -8
  238. package/extended/examples/miscellaneous/vertically-stacked-axes-chart.md +1 -1
  239. package/extended/examples/miscellaneous/violin-chart.md +1 -1
  240. package/extended/examples/miscellaneous/word-cloud.md +11 -10
  241. package/extended/examples/pie-donut/animated-time-line-pie-chart.md +1 -1
  242. package/extended/examples/pie-donut/donut-chart.md +1 -1
  243. package/extended/examples/pie-donut/donut-with-radial-gradient.md +2 -2
  244. package/extended/examples/pie-donut/dragging-pie-slices.md +1 -1
  245. package/extended/examples/pie-donut/grained-gradient-pie.md +1 -1
  246. package/extended/examples/pie-donut/nested-donut-chart.md +4 -4
  247. package/extended/examples/pie-donut/pie-chart-broken-slices.md +1 -1
  248. package/extended/examples/pie-donut/pie-chart-with-legend.md +1 -1
  249. package/extended/examples/pie-donut/pie-chart.md +3 -3
  250. package/extended/examples/pie-donut/pie-of-a-pie.md +1 -1
  251. package/extended/examples/pie-donut/semi-circle-pie-chart.md +1 -1
  252. package/extended/examples/pie-donut/simple-pie-chart.md +4 -3
  253. package/extended/examples/pie-donut/two-level-pie-chart.md +1 -1
  254. package/extended/examples/pie-donut/two-pie-charts-with-single-legend.md +1 -1
  255. package/extended/examples/pie-donut/variable-radius-nested-donut-chart.md +2 -3
  256. package/extended/examples/pie-donut/variable-radius-nested-pie.md +1 -1
  257. package/extended/examples/pie-donut/variable-radius-pie-chart.md +1 -1
  258. package/extended/examples/radar-polar/flower-chart.md +1 -1
  259. package/extended/examples/radar-polar/live-sorting-of-radar-columns.md +4 -11
  260. package/extended/examples/radar-polar/polar-area-chart.md +1 -1
  261. package/extended/examples/radar-polar/polar-chart.md +1 -1
  262. package/extended/examples/radar-polar/polar-scatter.md +1 -1
  263. package/extended/examples/radar-polar/radar-chart-visualizing-yearly-activities.md +3 -4
  264. package/extended/examples/radar-polar/radar-chart.md +1 -1
  265. package/extended/examples/radar-polar/radar-heat-map.md +1 -1
  266. package/extended/examples/radar-polar/radar-timeline.md +1 -1
  267. package/extended/examples/radar-polar/radar-with-date-axis.md +1 -1
  268. package/extended/examples/radar-polar/radial-bar-chart.md +1 -1
  269. package/extended/examples/radar-polar/radial-histogram.md +4 -12
  270. package/extended/examples/radar-polar/radial-line-graph.md +1 -1
  271. package/extended/examples/radar-polar/stacked-area-radar.md +2 -3
  272. package/extended/examples/radar-polar/variable-radius-radar.md +1 -1
  273. package/extended/examples/radar-polar/wheel-of-life.md +1 -1
  274. package/extended/examples/radar-polar/zoomable-radar.md +1 -1
  275. package/extended/examples/stock/changing-data-granularity.md +1 -1
  276. package/extended/examples/stock/live-stock-data.md +1 -1
  277. package/extended/examples/stock/separate-volume-panel.md +1 -1
  278. package/extended/examples/stock/stock-chart-comparing-prices.md +1 -1
  279. package/extended/examples/stock/stock-chart-with-bollinger-bands-indicator.md +1 -1
  280. package/extended/examples/stock/stock-chart-with-relative-strength-index.md +1 -1
  281. package/extended/examples/stock/stock-chart-with-volume-profile.md +1 -1
  282. package/extended/examples/stock/stock-chart.md +1 -1
  283. package/extended/examples/stock/stock-data-grouping.md +1 -1
  284. package/extended/examples/stock/stock-intraday-data.md +1 -1
  285. package/extended/examples/timeline/horizontal-serpentine-timeline.md +4 -6
  286. package/extended/examples/timeline/infinity-timeline.md +3 -3
  287. package/extended/examples/timeline/linear-process-diagram.md +1 -1
  288. package/extended/examples/timeline/serpentine-timeline-chart.md +4 -6
  289. package/extended/examples/timeline/spiral-timeline.md +3 -6
  290. package/extended/examples/timeline/stadium-track-chart.md +1 -1
  291. package/extended/examples/xy-bubble/animated-xy-bubble-timeline-chart.md +1 -1
  292. package/extended/examples/xy-bubble/beeswarm.md +1 -1
  293. package/extended/examples/xy-bubble/bubble-based-heat-map.md +4 -4
  294. package/extended/examples/xy-bubble/bubble-chart-with-pie-bullets.md +1 -1
  295. package/extended/examples/xy-bubble/bubble-chart.md +1 -1
  296. package/extended/examples/xy-bubble/irregular-interval-xy.md +1 -1
  297. package/extended/examples/xy-bubble/motion-chart.md +2 -5
  298. package/extended/examples/xy-bubble/scatter-chart.md +1 -1
  299. package/extended/examples/xy-bubble/scatter-plot-with-tens-of-thousands-points.md +7 -5
  300. package/extended/examples/xy-bubble/xy-chart-date-based-axis.md +1 -1
  301. package/extended/examples/xy-bubble/xy-chart-fills-axis.md +1 -1
  302. package/extended/examples/xy-bubble/xy-chart-value-based-line-graphs.md +1 -1
  303. package/extended/examples/xy-bubble/xy-error-chart.md +2 -5
  304. package/extended/examples/xy-bubble/zoomable-bubble-chart.md +2 -5
  305. package/extended/reference/animationoptions.md +1 -0
  306. package/extended/reference/chartserializer.md +10 -1
  307. package/extended/reference/entity.md +5 -2
  308. package/extended/reference/ibasecolumnseriesdataitem.md +1 -0
  309. package/extended/reference/ibasecolumnseriessettings.md +2 -0
  310. package/extended/reference/ichartserializersettings.md +13 -16
  311. package/extended/reference/ideclaredanimation.md +57 -0
  312. package/extended/reference/ieasinginfo.md +29 -0
  313. package/extended/reference/ientitysettings.md +5 -2
  314. package/extended/reference/imapchartsettings.md +2 -0
  315. package/extended/reference/imaplineseriesdataitem.md +1 -0
  316. package/extended/reference/imaplineseriessettings.md +2 -0
  317. package/extended/reference/imappointseriesdataitem.md +4 -2
  318. package/extended/reference/imappointseriessettings.md +7 -3
  319. package/extended/reference/iparsesettings.md +9 -3
  320. package/extended/reference/irootsettings.md +4 -0
  321. package/extended/reference/iscrollbarsettings.md +1 -0
  322. package/extended/reference/iserialchartcontainersettings.md +16 -0
  323. package/extended/reference/iserializersettings.md +2 -1
  324. package/extended/reference/iseriesdataitem.md +1 -0
  325. package/extended/reference/iseriessettings.md +2 -0
  326. package/extended/reference/mapchart.md +4 -0
  327. package/extended/reference/mappointseries.md +7 -3
  328. package/extended/reference/serialchart.md +1 -1
  329. package/extended/reference/serialchartcontainer.md +34 -0
  330. package/extended/reference/serializer.md +2 -1
  331. package/extended/reference/series.md +2 -0
  332. package/package.json +5 -2
  333. package/src/tools.js +73 -21
@@ -214,7 +214,7 @@ series.set("snapTooltip", true);
214
214
  Bullets on timeline charts work the same as XY charts:
215
215
 
216
216
  ```js
217
- series.bullets.push(function() {
217
+ series.bullets.push(function(root, series, dataItem) {
218
218
  return am5.Bullet.new(root, {
219
219
  sprite: am5.Circle.new(root, {
220
220
  radius: 5,
@@ -258,7 +258,7 @@ series.bullets.push(function(root, series, dataItem) {
258
258
 
259
259
  ```js
260
260
  // Click on data points (via bullets)
261
- series.bullets.push(function() {
261
+ series.bullets.push(function(root, series, dataItem) {
262
262
  var circle = am5.Circle.new(root, {
263
263
  radius: 5,
264
264
  fill: series.get("fill"),
@@ -346,7 +346,7 @@ chart.get("cursor").events.on("cursormoved", function(ev) {
346
346
  series.fills.template.setAll({ visible: true, fillOpacity: 0.3 });
347
347
 
348
348
  // Add bullets
349
- series.bullets.push(function() {
349
+ series.bullets.push(function(root, series, dataItem) {
350
350
  return am5.Bullet.new(root, {
351
351
  sprite: am5.Circle.new(root, {
352
352
  radius: 4,
package/content/venn.md CHANGED
@@ -147,6 +147,10 @@ series.labels.template.adapters.add("text", function(text, target) {
147
147
  });
148
148
  ```
149
149
 
150
+ ## Serialization gotcha: custom hover is not captured
151
+
152
+ `series.hoverGraphics` (the dashed set outline used in the amCharts venn demo) and `slices.template.states.create("hover", …)` are **not** written by `am5plugins_json.ChartSerializer` as of 5.20.8 — a venn rebuilt from JSON loses any custom hover look (`slices.template.tooltipText` does round-trip). Re-apply `hoverGraphics.setAll({...})` in code after `JsonParser.parse()`.
153
+
150
154
  ## Click events
151
155
 
152
156
  ```js
@@ -156,6 +160,8 @@ series.slices.template.events.on("click", function(ev) {
156
160
  });
157
161
  ```
158
162
 
163
+ To open a URL on click, no handler is needed (5.20.7): `am5venn.Venn.new(root, { …, urlField: "url", linkTarget: "_blank" })` (`linkTarget` default `"_self"`) links each slice — sets and intersections — to the `url` in its data row; the pointer cursor is set automatically.
164
+
159
165
  ## Legend
160
166
 
161
167
  ```js
@@ -79,6 +79,8 @@ series.appear(1000);
79
79
  | `sequencedInterpolation` | boolean | `true` | Stagger the word reveal instead of showing all at once |
80
80
  | `sequencedDelay` | number | `15` | Milliseconds between words when `sequencedInterpolation` is on |
81
81
 
82
+ **Parser settings and `text`:** `minValue`, `maxCount`, `minWordLength` and `excludeWords` are consumed when `text` is parsed. Since **5.20.0** changing any of them on a live series re-parses `text` automatically. On older versions they only took effect on the next `text` assignment — set them **before** `text`, or re-assign `text` after changing them.
83
+
82
84
  ### excludeWords example
83
85
 
84
86
  ```js
package/content/xy.md CHANGED
@@ -95,6 +95,7 @@ chart.set("cursor", am5xy.XYCursor.new(root, {
95
95
  ### Scrollbar
96
96
  ```js
97
97
  chart.set("scrollbarX", am5.Scrollbar.new(root, { orientation: "horizontal" }));
98
+ // opposite: true (5.20.2) puts scrollbarX below the plot / scrollbarY on the left
98
99
  ```
99
100
 
100
101
  ### Legend
@@ -166,7 +167,7 @@ xAxis.data.setAll(data);
166
167
  - `tooltip` — shows category under cursor
167
168
 
168
169
  **Gotchas:**
169
- - Category order in axis data and series data must match
170
+ - Since 5.20.6 series data need **not** follow the axis-category order for every item to be drawn (before, out-of-order items — e.g. Gantt-like column charts sorted by date — could silently disappear). Line series still connect points in **data** order, so keep line data in category order.
170
171
  - Forgetting `xAxis.data.setAll()` is the #1 mistake — the chart will render empty
171
172
 
172
173
  ## DateAxis
@@ -191,6 +192,10 @@ const xAxis = chart.xAxes.push(am5xy.DateAxis.new(root, {
191
192
  - `markUnitChange: true` — highlights when time unit changes on axis labels (e.g., new month)
192
193
  - `tooltipDateFormat` — format string for cursor tooltip
193
194
 
195
+ **Live updates — two settings that do not refresh on `set()`:**
196
+ - **Date format maps** (`dateFormats`, `periodChangeDateFormats`, `minorDateFormats`): after `axis.set("dateFormats", {...})` already-rendered labels keep their old text. `axis.markDirtyValues()` is not enough — call **`axis.markDirtySize()`** to make the axis re-run label formatting.
197
+ - **`groupIntervals`** (with `groupData: true`): amCharts only (re)computes grouping when a series' data is set, so changing the allowed intervals on an already-grouped axis does nothing until you re-set the data on every series bound to the axis: `series.data.setAll(series.data.values.slice())`.
198
+
194
199
  **Data format:**
195
200
  ```js
196
201
  series.data.setAll([
@@ -324,7 +329,12 @@ series.columns.template.setAll({
324
329
  width: am5.percent(80), // column width
325
330
  });
326
331
 
327
- // Individual column colors from data:
332
+ // Individual column colors (5.20.4) — declarative, serializes to JSON:
333
+ series.set("colorByDataItem", true); // each column takes the next color from series.get("colors")
334
+ // series.set("colors", am5.ColorSet.new(root, { colors: [...] })); // optional own palette (the series makes one if absent)
335
+ // Per-item color from data instead: templateField + a `fill` in each data item (see pie.md "Data-driven slice colors")
336
+
337
+ // Pre-5.20.4 fallback — an adapter (does NOT survive JSON serialization):
328
338
  series.columns.template.adapters.add("fill", (fill, target) => {
329
339
  return chart.get("colors").getIndex(series.columns.indexOf(target));
330
340
  });
@@ -403,6 +413,7 @@ Enables zooming/panning via scrollbar. Can optionally include a preview chart.
403
413
  // Simple scrollbar:
404
414
  chart.set("scrollbarX", am5.Scrollbar.new(root, {
405
415
  orientation: "horizontal"
416
+ // opposite: true // (5.20.2) place below the plot instead of above (scrollbarY: left instead of right)
406
417
  }));
407
418
 
408
419
  // Scrollbar with preview chart:
@@ -579,6 +590,14 @@ series.bullets.push(function(root, series, dataItem) {
579
590
 
580
591
  // Auto-hide bullets when too close together
581
592
  series.set("minBulletDistance", 20);
593
+
594
+ // Pulsing bullet declared as data (5.20.8) — survives JSON serialization, unlike animate()
595
+ series.bullets.push(function(root, series, dataItem) {
596
+ return am5.Bullet.new(root, {
597
+ sprite: am5.Circle.new(root, { radius: 5, fill: series.get("fill"),
598
+ animations: [{ key: "scale", from: 1, to: 1.6, duration: 800, loops: 0, yoyo: true, easing: "sine" }] })
599
+ });
600
+ });
582
601
  ```
583
602
 
584
603
  ## Dual Y-axis (multiple value axes)
@@ -610,8 +629,13 @@ var series2 = chart.series.push(am5xy.LineSeries.new(root, {
610
629
  xAxis: xAxis, yAxis: yAxis2,
611
630
  valueYField: "units", valueXField: "date"
612
631
  }));
632
+
633
+ // Removing an axis — go through the list, NOT axis.dispose():
634
+ chart.yAxes.removeValue(yAxis2); // the list auto-disposes the removed axis
613
635
  ```
614
636
 
637
+ `axis.dispose()` marks the axis disposed but **leaves it in `chart.yAxes`/`chart.xAxes`** (unlike `series.dispose()`, which removes itself from `chart.series`). The stale entry keeps rendering in anything built from the list and makes `ChartSerializer` throw `Template is disposed`. Always use `removeValue(axis)` / `removeIndex(i)`.
638
+
615
639
  ## Axis titles
616
640
 
617
641
  ```js
@@ -669,8 +693,14 @@ series.bullets.push(function(root, series, dataItem) {
669
693
  xAxis.events.on("rangechanged", function() {
670
694
  console.log("Axis range changed (zoomed/scrolled)");
671
695
  });
696
+
697
+ // Open a URL on click without a handler (5.20.7): columns and bullets of the series are linked
698
+ series.set("urlField", "url"); // data row: { category: "A", value: 10, url: "https://…" }
699
+ series.set("linkTarget", "_blank"); // default "_self"
672
700
  ```
673
701
 
702
+ `urlField` has no default (links off until set) and works on every series' bullets and on all column-type series (`ColumnSeries`, `CandlestickSeries`, `OHLCSeries`, Gantt). The pointer cursor is set automatically unless you set `cursorOverStyle`; `javascript:`/`data:`/`vbscript:` URLs are never opened; override `series.openUrl(dataItem)` to intercept.
703
+
674
704
  ## Chart settings reference
675
705
 
676
706
  ```js
@@ -268,7 +268,7 @@ lineSeries.pushDataItem({
268
268
 
269
269
  This can also work the other way around: we can make a data item form map line series "stick" to any point on a line.
270
270
 
271
- All we have to do is to set `lineDataItem` to a data item of the specific line, as well as `positionOnLine` to indicate relative position, when creating a point series data item:
271
+ All we have to do is to set `lineDataItem` to a data item of the specific line, as well as `positionOnLine` to indicate relative position, when creating a point series data item (since 5.20.6 the same can be done in regular data — see "Points on a line via data" below):
272
272
 
273
273
  // Create line series
274
274
  let lineSeries = chart.series.push(
@@ -369,4 +369,113 @@ If set, this will be added to the angle calculated by `autoRotate`. Can be used
369
369
 
370
370
  The below example uses above code, albeit with the slightly more sophisticated image as a point bullet:
371
371
 
372
+ ### Points on a line via data (5.20.6)
373
+
374
+ Since 5.20.6, `lineId`, `positionOnLine`, `autoRotate` and `autoRotateAngle` can be given in point series' data, so a point placed on a line no longer needs to be created with `pushDataItem()` and a `lineDataItem`. `lineId` is the `id` of a line in this line series' data (the line series' `idField`, `"id"` by default). Pushing the line series to the chart before the point series is a safe precaution.
375
+
376
+ The data fields are read via these point series settings, which all have defaults, so nothing needs to be set:
377
+
378
+ Setting
379
+
380
+ Default
381
+
382
+ `lineIdField`
383
+
384
+ `"lineId"`
385
+
386
+ `positionOnLineField`
387
+
388
+ `"positionOnLine"`
389
+
390
+ `autoRotateField`
391
+
392
+ `"autoRotate"`
393
+
394
+ `autoRotateAngleField`
395
+
396
+ `"autoRotateAngle"`
397
+
398
+ `autoRotate` and `autoRotateAngle` values in data take precedence over the same settings on the bullet.
399
+
400
+ ```javascript
401
+ // Create line series
402
+ var lineSeries = chart.series.push(
403
+ am5map.MapLineSeries.new(root, {})
404
+ );
405
+
406
+ lineSeries.data.setAll([{
407
+ id: "route",
408
+ geometry: {
409
+ type: "LineString",
410
+ coordinates: [
411
+ [ -73.778137, 40.641312 ],
412
+ [ -0.454296, 51.470020 ],
413
+ [ 116.597504, 40.072498 ]
414
+ ]
415
+ }
416
+ }]);
417
+
418
+ // Create point series
419
+ var pointSeries = chart.series.push(
420
+ am5map.MapPointSeries.new(root, {})
421
+ );
422
+
423
+ pointSeries.bullets.push(function(root, series, dataItem) {
424
+ return am5.Bullet.new(root, {
425
+ sprite: am5.Circle.new(root, {
426
+ radius: 5,
427
+ fill: am5.color(0xff0000)
428
+ })
429
+ });
430
+ });
431
+
432
+ pointSeries.data.setAll([{
433
+ lineId: "route",
434
+ positionOnLine: 0.7,
435
+ autoRotate: true
436
+ }]);
437
+ ```
438
+
439
+ NOTE This matters when the chart is [serialized](https://www.amcharts.com/docs/v5/concepts/serializing/chart-serializer/): points created with `pushDataItem()` are not data rows, so they are not part of a serialized config. Points given as data rows are.
440
+
441
+ #### Animating a point along a line (5.20.8)
442
+
443
+ To make a point travel along its line, give the bullet's sprite an [`animations`](https://www.amcharts.com/docs/v5/concepts/animations/) entry with `target: "dataItem"` that animates `positionOnLine`. Unlike a `dataItem.animate()` call in code, this is part of the config, so it survives serialization.
444
+
445
+ ```javascript
446
+ var planeSeries = chart.series.push(
447
+ am5map.MapPointSeries.new(root, {})
448
+ );
449
+
450
+ planeSeries.bullets.push(function(root, series, dataItem) {
451
+ return am5.Bullet.new(root, {
452
+ sprite: am5.Graphics.new(root, {
453
+ svgPath: "m2,106h28l24,30h72l-44,-133h35l80,132h98c21,0 21,34 0,34l-98,0 -80,134h-35l43,-133h-71l-24,30h-28l15,-47",
454
+ scale: 0.06,
455
+ centerX: am5.p50,
456
+ centerY: am5.p50,
457
+ animations: [{
458
+ target: "dataItem",
459
+ key: "positionOnLine",
460
+ from: 0,
461
+ to: 1,
462
+ duration: 6000,
463
+ loops: 0,
464
+ yoyo: true,
465
+ easing: "cubic",
466
+ ease: "inOut"
467
+ }]
468
+ })
469
+ });
470
+ });
471
+
472
+ planeSeries.data.setAll([{
473
+ lineId: "route",
474
+ positionOnLine: 0,
475
+ autoRotate: true
476
+ }]);
477
+ ```
478
+
479
+ Since 5.20.8, an auto-rotating point turns round (180° is added to its angle) while such an `animations` entry moves it back toward the start of the line — e.g. on the way back of a `yoyo` — so the plane faces the way it is travelling. This applies only to an `animations` entry on the bullet's sprite; a point moved from code with `dataItem.animate()` is not turned round, and that code is expected to turn it itself (e.g. via `autoRotateAngle`).
480
+
372
481
 
@@ -438,7 +438,7 @@ lineSeries.pushDataItem({
438
438
 
439
439
  This can also work the other way around: we can make a data item form map line series "stick" to any point on a line.
440
440
 
441
- All we have to do is to set `lineDataItem` to a data item of the specific line, as well as `positionOnLine` to indicate relative position, when creating a point series data item:
441
+ All we have to do is to set `lineDataItem` to a data item of the specific line, as well as `positionOnLine` to indicate relative position, when creating a point series data item (since 5.20.6 the same can be done in regular data — see "Points on a line via data" below):
442
442
 
443
443
  // Create line series
444
444
  let lineSeries = chart.series.push(
@@ -539,6 +539,115 @@ If set, this will be added to the angle calculated by `autoRotate`. Can be used
539
539
 
540
540
  The below example uses above code, albeit with the slightly more sophisticated image as a point bullet:
541
541
 
542
+ ### Points on a line via data (5.20.6)
543
+
544
+ Since 5.20.6, `lineId`, `positionOnLine`, `autoRotate` and `autoRotateAngle` can be given in point series' data, so a point placed on a line no longer needs to be created with `pushDataItem()` and a `lineDataItem`. `lineId` is the `id` of a line in a map line series' data (the line series' `idField`, `"id"` by default). Pushing the line series to the chart before the point series is a safe precaution.
545
+
546
+ The data fields are read via these point series settings, which all have defaults, so nothing needs to be set:
547
+
548
+ Setting
549
+
550
+ Default
551
+
552
+ `lineIdField`
553
+
554
+ `"lineId"`
555
+
556
+ `positionOnLineField`
557
+
558
+ `"positionOnLine"`
559
+
560
+ `autoRotateField`
561
+
562
+ `"autoRotate"`
563
+
564
+ `autoRotateAngleField`
565
+
566
+ `"autoRotateAngle"`
567
+
568
+ `autoRotate` and `autoRotateAngle` values in data take precedence over the same settings on the bullet. (`polygonIdField`, on the other hand, still has no default and needs to be set to use polygon ids in data.)
569
+
570
+ ```javascript
571
+ // Create line series
572
+ var lineSeries = chart.series.push(
573
+ am5map.MapLineSeries.new(root, {})
574
+ );
575
+
576
+ lineSeries.data.setAll([{
577
+ id: "route",
578
+ geometry: {
579
+ type: "LineString",
580
+ coordinates: [
581
+ [ -73.778137, 40.641312 ],
582
+ [ -0.454296, 51.470020 ],
583
+ [ 116.597504, 40.072498 ]
584
+ ]
585
+ }
586
+ }]);
587
+
588
+ // Create point series
589
+ var pointSeries = chart.series.push(
590
+ am5map.MapPointSeries.new(root, {})
591
+ );
592
+
593
+ pointSeries.bullets.push(function(root, series, dataItem) {
594
+ return am5.Bullet.new(root, {
595
+ sprite: am5.Circle.new(root, {
596
+ radius: 5,
597
+ fill: am5.color(0xff0000)
598
+ })
599
+ });
600
+ });
601
+
602
+ pointSeries.data.setAll([{
603
+ lineId: "route",
604
+ positionOnLine: 0.7,
605
+ autoRotate: true
606
+ }]);
607
+ ```
608
+
609
+ NOTE This matters when the chart is [serialized](https://www.amcharts.com/docs/v5/concepts/serializing/chart-serializer/): points created with `pushDataItem()` are not data rows, so they are not part of a serialized config. Points given as data rows are.
610
+
611
+ #### Animating a point along a line (5.20.8)
612
+
613
+ To make a point travel along its line, give the bullet's sprite an [`animations`](https://www.amcharts.com/docs/v5/concepts/animations/) entry with `target: "dataItem"` that animates `positionOnLine`. Unlike a `dataItem.animate()` call in code, this is part of the config, so it survives serialization.
614
+
615
+ ```javascript
616
+ var planeSeries = chart.series.push(
617
+ am5map.MapPointSeries.new(root, {})
618
+ );
619
+
620
+ planeSeries.bullets.push(function(root, series, dataItem) {
621
+ return am5.Bullet.new(root, {
622
+ sprite: am5.Graphics.new(root, {
623
+ svgPath: "m2,106h28l24,30h72l-44,-133h35l80,132h98c21,0 21,34 0,34l-98,0 -80,134h-35l43,-133h-71l-24,30h-28l15,-47",
624
+ scale: 0.06,
625
+ centerX: am5.p50,
626
+ centerY: am5.p50,
627
+ animations: [{
628
+ target: "dataItem",
629
+ key: "positionOnLine",
630
+ from: 0,
631
+ to: 1,
632
+ duration: 6000,
633
+ loops: 0,
634
+ yoyo: true,
635
+ easing: "cubic",
636
+ ease: "inOut"
637
+ }]
638
+ })
639
+ });
640
+ });
641
+
642
+ planeSeries.data.setAll([{
643
+ lineId: "route",
644
+ positionOnLine: 0,
645
+ autoRotate: true
646
+ }]);
647
+ ```
648
+
649
+ Since 5.20.8, an auto-rotating point turns round (180° is added to its angle) while such an `animations` entry moves it back toward the start of the line — e.g. on the way back of a `yoyo` — so the plane faces the way it is travelling. This applies only to an `animations` entry on the bullet's sprite; a point moved from code with `dataItem.animate()` is not turned round, and that code is expected to turn it itself (e.g. via `autoRotateAngle`).
650
+
542
651
 
543
652
  ## Hover behavior
544
653
 
@@ -378,6 +378,53 @@ polygonSeries.mapPolygons.template.events.on("click", function(ev) {
378
378
  }
379
379
  });
380
380
 
381
+ ### Linking via `urlField` (5.20.7)
382
+
383
+ Since 5.20.7 a click handler is not needed: set series' `urlField` to the data field holding the URL, and clicking a polygon that has one opens it. `linkTarget` sets where it opens.
384
+
385
+ ```javascript
386
+ var polygonSeries = chart.series.push(
387
+ am5map.MapPolygonSeries.new(root, {
388
+ geoJSON: am5geodata_worldLow,
389
+ urlField: "url",
390
+ linkTarget: "_blank"
391
+ })
392
+ );
393
+
394
+ polygonSeries.data.setAll([{
395
+ id: "US",
396
+ url: "https://en.wikipedia.org/wiki/United_States"
397
+ }, {
398
+ id: "CA",
399
+ url: "https://en.wikipedia.org/wiki/Canada"
400
+ }, {
401
+ id: "MX",
402
+ url: "https://en.wikipedia.org/wiki/Mexico"
403
+ }]);
404
+ ```
405
+
406
+ Setting
407
+
408
+ Default
409
+
410
+ Comment
411
+
412
+ `urlField`
413
+
414
+ (none)
415
+
416
+ A data field holding the URL to open when the data item's element is clicked. Links are off until this is set.
417
+
418
+ `linkTarget`
419
+
420
+ `"_self"`
421
+
422
+ Where the URL opens: `"_self"` (same window, like a plain link), `"_blank"` (new tab, opened with `noopener`), or a named window/frame. A chart embedded in an iframe usually wants `"_blank"` or `"_top"`.
423
+
424
+ Polygons with a URL get a pointer cursor automatically, unless you set a `cursorOverStyle` yourself. `urlField` can be set after the data, and a URL added to an item later (e.g. via `data.setIndex()`) links too. Script URLs (`javascript:`, `data:`, `vbscript:`) are not opened. To intercept links (e.g. in an editor), override the series' `openUrl(dataItem)` method.
425
+
426
+ The same settings work on other series: they link bullets of any series, columns (including candlesticks, OHLC and Gantt bars), pie/funnel/pyramid/pictorial slices, Venn slices, and map lines. Hierarchy nodes, flow nodes and links, word cloud words and map Sankey nodes are not linked — use a click handler for those.
427
+
381
428
  ## Excluding or including polygons
382
429
 
383
430
  Series can be set up to either exclude certain polygons out of the loaded geodata, or only include specific ones.
@@ -60,6 +60,8 @@ Or it can be a subset of data.
60
60
 
61
61
  IMPORTANTThe order of categories needs to be the same in both series' and axis' data.
62
62
 
63
+ NOTE Since 5.20.6, series items are drawn even when the series' data is not in the same order as the axis categories — for example, a Gantt-like column chart where several items share a category and the data is sorted by date. (Before, some of those items were not drawn at all.) A line series, however, still connects its points in data order, so for lines keep the series data in category order.
64
+
63
65
  Having different data for category axis makes sense in the situations where we want to have only specific categories displayed:
64
66
 
65
67
  let xAxis = chart.xAxes.push(
@@ -102,6 +102,124 @@ handDataItem.animate({
102
102
  });
103
103
 
104
104
 
105
+ ## Declarative animations (`animations` setting)
106
+
107
+ Since 5.20.8 every element has an `animations` setting: a list of animations described as data instead of started with `animate()`. Being a plain setting, it can be set like any other — on an element, a template, a bullet's sprite, or in a [JSON config](https://www.amcharts.com/docs/v5/concepts/serializing/) — and a [serialized](https://www.amcharts.com/docs/v5/concepts/serializing/chart-serializer/) chart keeps it.
108
+
109
+ NOTE The typings (and API reference) mark `animations` as `@since 5.21.0`, but it shipped in 5.20.8.
110
+
111
+ Each entry in the list is an object with these fields:
112
+
113
+ Field
114
+
115
+ Default
116
+
117
+ Comment
118
+
119
+ `key`
120
+
121
+ (required)
122
+
123
+ Setting to animate. With `target: "dataItem"`, a value of the element's data item.
124
+
125
+ `from`
126
+
127
+ current value
128
+
129
+ Value to start from.
130
+
131
+ `to`
132
+
133
+ (required)
134
+
135
+ Value to animate to.
136
+
137
+ `duration`
138
+
139
+ (required)
140
+
141
+ Duration in milliseconds. With `yoyo`, it is the duration of one way, so a full there-and-back takes twice as long.
142
+
143
+ `delay`
144
+
145
+ `0`
146
+
147
+ Milliseconds to wait before starting.
148
+
149
+ `loops`
150
+
151
+ `1`
152
+
153
+ How many times to play the animation. `0` plays it forever (`Infinity` works too in JavaScript).
154
+
155
+ `yoyo`
156
+
157
+ `false`
158
+
159
+ Go back to `from` after reaching `to`, rather than jumping back.
160
+
161
+ `easing`
162
+
163
+ `"linear"`
164
+
165
+ Easing **by name**: `"linear"`, `"quad"`, `"cubic"`, `"exp"`, `"sine"`, `"circle"`, `"bounce"` or `"elastic"`. An unknown name silently falls back to linear. Functions are not accepted here.
166
+
167
+ `ease`
168
+
169
+ `"in"`
170
+
171
+ Which way the easing applies: `"in"`, `"out"` or `"inOut"` — the same as wrapping the function in `am5.ease.out()` or `am5.ease.inOut()`.
172
+
173
+ `target`
174
+
175
+ `"self"`
176
+
177
+ `"self"` animates a setting of the element; `"dataItem"` animates a value of the element's data item.
178
+
179
+ The following makes each bullet pulse, for ever:
180
+
181
+ ```javascript
182
+ series.bullets.push(function (root, series, dataItem) {
183
+ return am5.Bullet.new(root, {
184
+ sprite: am5.Circle.new(root, {
185
+ radius: 6,
186
+ animations: [
187
+ { key: "scale", from: 1, to: 1.6, duration: 800, loops: 0, yoyo: true, easing: "sine" },
188
+ { key: "opacity", from: 1, to: 0.3, duration: 800, loops: 0, yoyo: true }
189
+ ]
190
+ })
191
+ });
192
+ });
193
+ ```
194
+
195
+ The animations start when the setting is applied, restart when it changes (the settings they animated are put back to what they held first), and stop when the element is disposed.
196
+
197
+ IMPORTANT With `from` omitted, the animation starts from the setting's current value. If that value is `undefined`, the element jumps straight to `to` and nothing animates. `scale`, `opacity` and `rotation` are fine (the theme gives them a value), but settings like `dx` or `fill`, or a data item value that is not set yet (e.g. a map point without `positionOnLine`), need an explicit `from`.
198
+
199
+ With `target: "dataItem"`, the entry animates the data item the element belongs to — for example, a map point's `positionOnLine`, which flies the point along its line. See "[Map point series: Points on a line](https://www.amcharts.com/docs/v5/charts/map-chart/map-point-series/#Points_on_a_line)".
200
+
201
+ In a JSON config, colors and percents in `from`/`to` are written in their object form:
202
+
203
+ ```json
204
+ {
205
+ "type": "Circle",
206
+ "settings": {
207
+ "radius": 6,
208
+ "animations": [{
209
+ "key": "fill",
210
+ "from": { "type": "Color", "value": "#ff0000" },
211
+ "to": { "type": "Color", "value": "#0000ff" },
212
+ "duration": 1000,
213
+ "loops": 0,
214
+ "yoyo": true
215
+ }]
216
+ }
217
+ }
218
+ ```
219
+
220
+ A serialized chart keeps the values the animated settings were configured with, never ones caught mid-animation. `ChartSerializer` can also turn a never-ending animation started in code with `animate()` into an `animations` entry — see its `runningAnimations` setting in "[Chart serializer](https://www.amcharts.com/docs/v5/concepts/serializing/chart-serializer/)".
221
+
222
+
105
223
  ## Animating between states
106
224
 
107
225
  When element [state](https://www.amcharts.com/docs/v5/concepts/settings/states/) is applied, its values will replace current setting values.
@@ -328,12 +446,12 @@ Will overshoot end value, then bounce back a few times before settling down at t
328
446
 
329
447
  Constant speed during all duration.
330
448
 
331
- `am5.ease.pow`
332
-
333
449
  `am5.ease.quad`
334
450
 
335
451
  `am5.ease.sine`
336
452
 
453
+ NOTE `am5.ease.pow` is not a ready-to-use easing: it is `pow(t, e)` and needs an exponent as its second parameter. Passed directly as `easing`, the exponent is `undefined` and the animation produces `NaN`. Wrap it in a function instead: `easing: function(t) { return am5.ease.pow(t, 3); }`.
454
+
337
455
  Below demo shows the behavior of various basic easing functions:
338
456
 
339
457
 
@@ -375,4 +493,20 @@ The basic easing function is applied at the end animation.
375
493
 
376
494
  Plays animation to the end value, then returns back to the starting value, using supplied basic function.
377
495
 
496
+ ### Easing functions by name (5.20.8)
497
+
498
+ The eight basic easing functions listed above carry a name, which is what lets the [`animations` setting](#Declarative_animations_animations_setting) and JSON configs refer to them as strings.
499
+
500
+ `am5.ease.byName(name, mode)` returns an easing function by its name — `"linear"`, `"quad"`, `"cubic"`, `"exp"`, `"sine"`, `"circle"`, `"bounce"` or `"elastic"` — optionally wrapped by `mode`: `"in"` (default), `"out"` or `"inOut"`. An unknown name gives `linear`.
501
+
502
+ `am5.ease.easingInfo(easing)` does the opposite: it returns `{ easing, ease?, yoyo? }` describing a function, or `undefined` for one that cannot be named. Functions made with `out()`, `inOut()` and `yoyo()` keep the name of the function they wrap; a function of your own, a wrapped `pow`, or a combination like `out(yoyo(...))` has none.
503
+
504
+ ```javascript
505
+ am5.ease.byName("cubic", "out"); // same as am5.ease.out(am5.ease.cubic)
506
+ am5.ease.easingInfo(am5.ease.yoyo(am5.ease.sine)); // { easing: "sine", yoyo: true }
507
+ am5.ease.easingInfo(function(t) { return t * t; }); // undefined
508
+ ```
509
+
510
+ NOTE The typings mark `byName()`, `easingInfo()` and `IEasingInfo` as `@since 5.21.0`, but they shipped in 5.20.8.
511
+
378
512
 
@@ -773,6 +773,8 @@ am5.net.load("/data/mydata.csv").then(function(result) {
773
773
  console.log("Error loading " + result.xhr.responseURL);
774
774
  });
775
775
 
776
+ NOTE Since 5.20.7, `CSVParser.parse()` copes with an empty string, such as an empty response from a server. Before, it looped until it ran out of memory and threw "Invalid array length". With `useColumnNames: true` an empty string now parses to an empty array (`[]`); without it, to a single empty row (`[{}]`) — check for an empty `result.response` before parsing if you need to tell the two apart.
777
+
776
778
  We can also use standalone data parser to parse date/numeric/color fields in data after it is parsed:
777
779
 
778
780
  am5.net.load("/data/mydata.csv").then(function(result) {
@@ -166,6 +166,20 @@ xAxis.onPrivate("selectionMax", function(value, target) {
166
166
  console.log("End date changed:", end);
167
167
  });
168
168
 
169
+ ### One-shot handlers (5.20.4)
170
+
171
+ `once(key, callback)` works like `on()` but fires only the first time that setting changes (or is set), then removes itself. `onceDebounced(key, callback, delay)` is the debounced version. Both return an `IDisposer`.
172
+
173
+ series.once("visible", function(visible, target) {
174
+ console.log("First visibility change", visible);
175
+ });
176
+
177
+ xAxis.onceDebounced("start", function(start) {
178
+ console.log("Zoom settled at", start);
179
+ }, 300);
180
+
181
+ (Do not confuse with `events.once("eventName", …)`, which has existed for regular events all along.)
182
+
169
183
  ### Removing
170
184
 
171
185
  Turning off value change events are similar to regular events: we can just use `off()` or `offPrivate()` methods.