@amcharts/amcharts5-mcp 1.5.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 (315) hide show
  1. package/content/SKILL.md +59 -11
  2. package/content/flow.md +3 -0
  3. package/content/map.md +35 -1
  4. package/content/pie.md +6 -0
  5. package/content/venn.md +3 -1
  6. package/content/xy.md +15 -1
  7. package/extended/charts/map-chart/map-line-series.md +110 -1
  8. package/extended/charts/map-chart/map-point-series.md +110 -1
  9. package/extended/charts/map-chart/map-polygon-series.md +47 -0
  10. package/extended/charts/xy-chart/axes/category-axis.md +2 -0
  11. package/extended/concepts/animations.md +136 -2
  12. package/extended/concepts/data.md +2 -0
  13. package/extended/concepts/serializing/chart-serializer.md +50 -25
  14. package/extended/concepts/serializing.md +3 -0
  15. package/extended/concepts/settings/template-fields.md +24 -0
  16. package/extended/examples/candlestick-ohlc/box-plot-chart.md +78 -73
  17. package/extended/examples/candlestick-ohlc/candlestick-chart.md +2 -5
  18. package/extended/examples/candlestick-ohlc/ohlc-chart.md +3 -6
  19. package/extended/examples/candlestick-ohlc/on-demand-data-loading.md +7 -7
  20. package/extended/examples/candlestick-ohlc/professional-candlesticks.md +3 -6
  21. package/extended/examples/candlestick-ohlc/stock-chart-candlesticks.md +1 -1
  22. package/extended/examples/column-bar/100-stacked-column-chart.md +3 -3
  23. package/extended/examples/column-bar/bar-and-line-chart-mix.md +3 -12
  24. package/extended/examples/column-bar/bar-chart-race.md +4 -11
  25. package/extended/examples/column-bar/bars-with-moving-bullets.md +1 -1
  26. package/extended/examples/column-bar/bullet-chart.md +1 -1
  27. package/extended/examples/column-bar/carbon-zero-progress.md +2 -3
  28. package/extended/examples/column-bar/clustered-bar-chart.md +3 -13
  29. package/extended/examples/column-bar/clustered-column-chart.md +2 -2
  30. package/extended/examples/column-bar/column-and-line-mix.md +1 -1
  31. package/extended/examples/column-bar/column-chart-images-top.md +4 -10
  32. package/extended/examples/column-bar/column-with-rotated-series.md +4 -11
  33. package/extended/examples/column-bar/columns-with-grainy-gradients.md +4 -5
  34. package/extended/examples/column-bar/columns-with-moving-bullets.md +1 -1
  35. package/extended/examples/column-bar/curved-columns.md +4 -10
  36. package/extended/examples/column-bar/divergent-stacked-bars.md +1 -10
  37. package/extended/examples/column-bar/drag-and-change-column-value.md +4 -11
  38. package/extended/examples/column-bar/drag-ordering-of-bars.md +1 -1
  39. package/extended/examples/column-bar/dumbbell-plot.md +1 -1
  40. package/extended/examples/column-bar/floating-bar-chart.md +2 -3
  41. package/extended/examples/column-bar/grouped-and-sorted-columns.md +4 -10
  42. package/extended/examples/column-bar/grouped-stacks.md +1 -1
  43. package/extended/examples/column-bar/heat-map-with-legend.md +8 -8
  44. package/extended/examples/column-bar/horizontal-dumbbell-plot.md +1 -1
  45. package/extended/examples/column-bar/images-as-categories.md +16 -18
  46. package/extended/examples/column-bar/layered-column-chart.md +1 -1
  47. package/extended/examples/column-bar/lollipop-chart.md +1 -1
  48. package/extended/examples/column-bar/pareto-diagram.md +4 -7
  49. package/extended/examples/column-bar/partitioned-bar-chart.md +1 -1
  50. package/extended/examples/column-bar/pictorial-column-chart.md +1 -1
  51. package/extended/examples/column-bar/real-time-data-sorting.md +4 -11
  52. package/extended/examples/column-bar/risk-heatmap.md +9 -9
  53. package/extended/examples/column-bar/simple-column-chart.md +3 -3
  54. package/extended/examples/column-bar/sorted-bar-chart.md +4 -12
  55. package/extended/examples/column-bar/stacked-bar-chart-with-negative-values.md +1 -1
  56. package/extended/examples/column-bar/stacked-bar-chart.md +1 -1
  57. package/extended/examples/column-bar/stacked-clustered-column-chart.md +1 -1
  58. package/extended/examples/column-bar/stacked-column-chart.md +1 -1
  59. package/extended/examples/column-bar/stacked-waterfall-chart.md +1 -1
  60. package/extended/examples/column-bar/step-count-chart.md +1 -1
  61. package/extended/examples/column-bar/variance-indicators.md +1 -1
  62. package/extended/examples/column-bar/waffle-chart.md +1 -1
  63. package/extended/examples/column-bar/waterfall-chart.md +1 -1
  64. package/extended/examples/dashboards/maps-and-charts-dashboard.md +1 -1
  65. package/extended/examples/dashboards/road-trip-dashboard-with-map.md +24 -23
  66. package/extended/examples/flow/animated-sankey-diagram.md +200 -202
  67. package/extended/examples/flow/chord-diagram-with-animated-bullets.md +4 -2
  68. package/extended/examples/flow/chord-diagram.md +6 -4
  69. package/extended/examples/flow/horizontal-arc-diagram.md +4 -2
  70. package/extended/examples/flow/non-ribbon-chord-diagram.md +6 -4
  71. package/extended/examples/flow/sankey-diagram.md +4 -2
  72. package/extended/examples/flow/toggleable-chord-diagram.md +4 -2
  73. package/extended/examples/flow/traceable-sankey-diagram.md +4 -2
  74. package/extended/examples/flow/vertical-arc-diagram.md +4 -2
  75. package/extended/examples/flow/vertical-sankey-diagram.md +11 -19
  76. package/extended/examples/funnel-pyramid/funnel-chart-with-rounded-corners.md +1 -1
  77. package/extended/examples/funnel-pyramid/funnel-chart.md +1 -1
  78. package/extended/examples/funnel-pyramid/funnel-with-gradient-fill.md +1 -1
  79. package/extended/examples/funnel-pyramid/horizontal-funnel.md +1 -1
  80. package/extended/examples/funnel-pyramid/horizontal-pictorial-chart.md +1 -1
  81. package/extended/examples/funnel-pyramid/pictorial-chart.md +1 -1
  82. package/extended/examples/funnel-pyramid/pictorial-fraction-chart.md +1 -1
  83. package/extended/examples/funnel-pyramid/pictorial-stacked-chart.md +1 -1
  84. package/extended/examples/funnel-pyramid/pyramid-chart.md +1 -1
  85. package/extended/examples/gantt/editable-multilevel-gantt-chart.md +1 -1
  86. package/extended/examples/gantt/gantt-chart-dates.md +1 -1
  87. package/extended/examples/gantt/gantt-chart-in-read-only-mode.md +1 -1
  88. package/extended/examples/gantt/gantt-chart-playground.md +4 -3
  89. package/extended/examples/gantt/gantt-chart.md +1 -1
  90. package/extended/examples/gantt/gantt-with-hundreds-of-items.md +1 -1
  91. package/extended/examples/gauges/angular-gauge-with-two-axes.md +1 -1
  92. package/extended/examples/gauges/angular-gauge.md +1 -1
  93. package/extended/examples/gauges/animated-gauge.md +1 -1
  94. package/extended/examples/gauges/clock-with-two-faces.md +1 -1
  95. package/extended/examples/gauges/clock.md +1 -1
  96. package/extended/examples/gauges/compass-chart.md +1 -1
  97. package/extended/examples/gauges/gauge-with-bands.md +1 -1
  98. package/extended/examples/gauges/gauge-with-gradient-fill.md +1 -1
  99. package/extended/examples/gauges/multi-part-gauge.md +1 -1
  100. package/extended/examples/gauges/solid-gauge.md +1 -1
  101. package/extended/examples/gauges/yes-and-no-gauge.md +1 -1
  102. package/extended/examples/hierarchy/collapsible-force-directed-tree.md +3 -3
  103. package/extended/examples/hierarchy/drill-down-sunburst-chart.md +4 -4
  104. package/extended/examples/hierarchy/drill-down-treemap.md +5 -5
  105. package/extended/examples/hierarchy/dynamic-data-updates-on-treemap.md +4 -4
  106. package/extended/examples/hierarchy/force-directed-adding-links.md +4 -4
  107. package/extended/examples/hierarchy/force-directed-network.md +4 -4
  108. package/extended/examples/hierarchy/force-directed-tree-with-animated-bullets.md +11 -10
  109. package/extended/examples/hierarchy/force-directed-tree.md +3 -3
  110. package/extended/examples/hierarchy/horizontal-partition-chart.md +3 -3
  111. package/extended/examples/hierarchy/multilevel-tree-map.md +11 -10
  112. package/extended/examples/hierarchy/packed-circle-chart.md +3 -3
  113. package/extended/examples/hierarchy/rectangular-voronoi-tree-map.md +4 -2
  114. package/extended/examples/hierarchy/simple-treemap.md +4 -4
  115. package/extended/examples/hierarchy/single-level-packed-circles.md +11 -10
  116. package/extended/examples/hierarchy/sunburst-chart.md +3 -3
  117. package/extended/examples/hierarchy/sunburst-flavor-wheel.md +18 -21
  118. package/extended/examples/hierarchy/tree-chart.md +11 -10
  119. package/extended/examples/hierarchy/vertical-partition-chart.md +3 -3
  120. package/extended/examples/hierarchy/voronoi-treemap.md +11 -10
  121. package/extended/examples/hierarchy/zoomable-force-directed-tree.md +11 -10
  122. package/extended/examples/line-area/100-stacked-area-chart.md +3 -4
  123. package/extended/examples/line-area/animated-bullet-at-the-end-of-the-series.md +1 -1
  124. package/extended/examples/line-area/area-with-time-based-data.md +2 -3
  125. package/extended/examples/line-area/chart-with-gaps-in-data.md +2 -3
  126. package/extended/examples/line-area/comparing-different-date-values-google-analytics-style.md +2 -3
  127. package/extended/examples/line-area/control-chart.md +1 -1
  128. package/extended/examples/line-area/data-grouping-50k-points.md +1 -2
  129. package/extended/examples/line-area/date-axis-with-labels-near-minor-grid-lines.md +1 -1
  130. package/extended/examples/line-area/date-based-data.md +1 -1
  131. package/extended/examples/line-area/date-based-line-chart.md +4 -4
  132. package/extended/examples/line-area/divergent-lines.md +2 -3
  133. package/extended/examples/line-area/draggable-range-with-close-button.md +1 -1
  134. package/extended/examples/line-area/drawing-chart-series-with-mouse-or-touch.md +1 -1
  135. package/extended/examples/line-area/duration-on-value-axis.md +8 -8
  136. package/extended/examples/line-area/error-chart.md +2 -3
  137. package/extended/examples/line-area/evenly-spaced-date-axis.md +1 -1
  138. package/extended/examples/line-area/highlighting-line-chart-series-on-legend-hover.md +1 -1
  139. package/extended/examples/line-area/line-chart-adding-data-every-second.md +1 -1
  140. package/extended/examples/line-area/line-chart-with-horizontal-target.md +1 -1
  141. package/extended/examples/line-area/line-chart-with-range-slider.md +1 -1
  142. package/extended/examples/line-area/line-chart-with-scroll-and-zoom.md +1 -1
  143. package/extended/examples/line-area/line-different-colors-ups-downs.md +1 -1
  144. package/extended/examples/line-area/line-graph.md +1 -1
  145. package/extended/examples/line-area/line-with-changing-color.md +1 -1
  146. package/extended/examples/line-area/line-with-custom-bullets.md +21 -18
  147. package/extended/examples/line-area/line-with-data-labels.md +1 -1
  148. package/extended/examples/line-area/live-data.md +1 -1
  149. package/extended/examples/line-area/live-order-book-depth-chart.md +9 -15
  150. package/extended/examples/line-area/logarithmic-scale.md +1 -1
  151. package/extended/examples/line-area/manipulate-chart-data-with-mouse.md +1 -1
  152. package/extended/examples/line-area/mixed-daily-and-intra-day-chart.md +1 -1
  153. package/extended/examples/line-area/multiple-date-axes.md +1 -1
  154. package/extended/examples/line-area/multiple-value-axes.md +1 -1
  155. package/extended/examples/line-area/no-gap-date-axis.md +1 -1
  156. package/extended/examples/line-area/process-control-chart.md +1 -1
  157. package/extended/examples/line-area/range-area-chart.md +1 -1
  158. package/extended/examples/line-area/range-chart-with-different-fill-colors.md +2 -2
  159. package/extended/examples/line-area/reversed-value-axis.md +2 -3
  160. package/extended/examples/line-area/selecting-and-marking-multiple-ranges.md +1 -2
  161. package/extended/examples/line-area/show-percentage-change.md +1 -1
  162. package/extended/examples/line-area/smoothed-line-chart.md +1 -1
  163. package/extended/examples/line-area/smoothed-stacked-area.md +2 -3
  164. package/extended/examples/line-area/spline-graph.md +1 -1
  165. package/extended/examples/line-area/stacked-area.md +2 -3
  166. package/extended/examples/line-area/step-line-chart.md +1 -1
  167. package/extended/examples/line-area/step-line-without-risers.md +1 -1
  168. package/extended/examples/line-area/stream-chart.md +2 -3
  169. package/extended/examples/line-area/trend-lines.md +1 -1
  170. package/extended/examples/line-area/vertical-line-chart.md +1 -1
  171. package/extended/examples/line-area/zoomable-value-axis.md +6 -6
  172. package/extended/examples/maps/animations-along-lines.md +34 -28
  173. package/extended/examples/maps/approximate-working-hours-map.md +9 -1
  174. package/extended/examples/maps/capitals-map.md +363 -911
  175. package/extended/examples/maps/changing-map-projection.md +7 -6
  176. package/extended/examples/maps/day-and-night-world-map.md +172 -532
  177. package/extended/examples/maps/drill-down-congressional-map.md +2 -2
  178. package/extended/examples/maps/drill-down-map.md +4 -4
  179. package/extended/examples/maps/drill-down-to-countries.md +6 -6
  180. package/extended/examples/maps/flight-routes-map.md +9 -1
  181. package/extended/examples/maps/grouped-countries-map.md +2 -3
  182. package/extended/examples/maps/location-sensitive-map.md +2 -1
  183. package/extended/examples/maps/map-bubbles.md +11 -3
  184. package/extended/examples/maps/map-dynamic-pie-charts.md +1 -1
  185. package/extended/examples/maps/map-image-drill-down.md +14 -15
  186. package/extended/examples/maps/map-sankey-series.md +22 -0
  187. package/extended/examples/maps/map-timeline.md +1 -1
  188. package/extended/examples/maps/map-using-d3-projections.md +1 -1
  189. package/extended/examples/maps/map-with-animated-bubbles.md +4 -2
  190. package/extended/examples/maps/map-with-animated-lines.md +38 -26
  191. package/extended/examples/maps/map-with-curved-lines.md +35 -25
  192. package/extended/examples/maps/map-with-patterns.md +9 -4
  193. package/extended/examples/maps/map-with-pulsating-bullets.md +9 -13
  194. package/extended/examples/maps/map-with-sized-pin-bullets.md +1 -1
  195. package/extended/examples/maps/multi-series-map.md +5 -4
  196. package/extended/examples/maps/pacific-centered-map.md +2 -1
  197. package/extended/examples/maps/rotate-globe-to-a-selected-country.md +200 -29
  198. package/extended/examples/maps/rotating-globe-with-circles.md +19 -2
  199. package/extended/examples/maps/rotating-globe.md +77 -20
  200. package/extended/examples/maps/selecting-multiple-areas-map.md +1 -1
  201. package/extended/examples/maps/solar-eclipse-map.md +12 -7
  202. package/extended/examples/maps/trumps-reciprocal-tariffs-map.md +1 -1
  203. package/extended/examples/maps/us-congressional-districts.md +19 -10
  204. package/extended/examples/maps/us-heat-map.md +1 -1
  205. package/extended/examples/maps/weather-map.md +1 -1
  206. package/extended/examples/maps/world-map-with-clustered-points.md +2 -1
  207. package/extended/examples/maps/world-time-zone-map.md +2 -1
  208. package/extended/examples/maps/zooming-to-countries-map.md +91 -15
  209. package/extended/examples/miscellaneous/annotating-charts.md +3 -3
  210. package/extended/examples/miscellaneous/changing-data-word-cloud.md +4 -2
  211. package/extended/examples/miscellaneous/combined-bullet-column-line-chart.md +1 -1
  212. package/extended/examples/miscellaneous/complex-venn-diagram.md +9 -22
  213. package/extended/examples/miscellaneous/exporting-chart-to-image.md +1 -1
  214. package/extended/examples/miscellaneous/forest-plot.md +5 -5
  215. package/extended/examples/miscellaneous/historical-population-pyramid.md +2 -4
  216. package/extended/examples/miscellaneous/honeycomb-tile-map.md +1 -1
  217. package/extended/examples/miscellaneous/horizontally-stacked-axes.md +1 -1
  218. package/extended/examples/miscellaneous/hybrid-drill-down-pie-bar-chart.md +4 -4
  219. package/extended/examples/miscellaneous/infographic.md +1 -1
  220. package/extended/examples/miscellaneous/mekko.md +1 -1
  221. package/extended/examples/miscellaneous/micro-charts-sparklines.md +1 -1
  222. package/extended/examples/miscellaneous/pictogram.md +3 -5
  223. package/extended/examples/miscellaneous/population-pyramid.md +1 -1
  224. package/extended/examples/miscellaneous/progress-chart.md +2 -2
  225. package/extended/examples/miscellaneous/range-bullet-chart.md +1 -1
  226. package/extended/examples/miscellaneous/sentence-cloud.md +10 -19
  227. package/extended/examples/miscellaneous/spectrum-chart.md +4 -4
  228. package/extended/examples/miscellaneous/strip-plot.md +1 -1
  229. package/extended/examples/miscellaneous/tag-cloud.md +5 -4
  230. package/extended/examples/miscellaneous/tile-map.md +1 -1
  231. package/extended/examples/miscellaneous/venn-diagram-with-patterns.md +8 -8
  232. package/extended/examples/miscellaneous/venn-diagram.md +8 -8
  233. package/extended/examples/miscellaneous/vertically-stacked-axes-chart.md +1 -1
  234. package/extended/examples/miscellaneous/violin-chart.md +1 -1
  235. package/extended/examples/miscellaneous/word-cloud.md +11 -10
  236. package/extended/examples/pie-donut/animated-time-line-pie-chart.md +1 -1
  237. package/extended/examples/pie-donut/donut-chart.md +1 -1
  238. package/extended/examples/pie-donut/donut-with-radial-gradient.md +2 -2
  239. package/extended/examples/pie-donut/dragging-pie-slices.md +1 -1
  240. package/extended/examples/pie-donut/grained-gradient-pie.md +1 -1
  241. package/extended/examples/pie-donut/nested-donut-chart.md +4 -4
  242. package/extended/examples/pie-donut/pie-chart-broken-slices.md +1 -1
  243. package/extended/examples/pie-donut/pie-chart-with-legend.md +1 -1
  244. package/extended/examples/pie-donut/pie-chart.md +3 -3
  245. package/extended/examples/pie-donut/pie-of-a-pie.md +1 -1
  246. package/extended/examples/pie-donut/semi-circle-pie-chart.md +1 -1
  247. package/extended/examples/pie-donut/simple-pie-chart.md +4 -3
  248. package/extended/examples/pie-donut/two-level-pie-chart.md +1 -1
  249. package/extended/examples/pie-donut/two-pie-charts-with-single-legend.md +1 -1
  250. package/extended/examples/pie-donut/variable-radius-nested-donut-chart.md +2 -3
  251. package/extended/examples/pie-donut/variable-radius-nested-pie.md +1 -1
  252. package/extended/examples/pie-donut/variable-radius-pie-chart.md +1 -1
  253. package/extended/examples/radar-polar/flower-chart.md +1 -1
  254. package/extended/examples/radar-polar/live-sorting-of-radar-columns.md +4 -11
  255. package/extended/examples/radar-polar/polar-area-chart.md +1 -1
  256. package/extended/examples/radar-polar/polar-chart.md +1 -1
  257. package/extended/examples/radar-polar/polar-scatter.md +1 -1
  258. package/extended/examples/radar-polar/radar-chart-visualizing-yearly-activities.md +3 -4
  259. package/extended/examples/radar-polar/radar-chart.md +1 -1
  260. package/extended/examples/radar-polar/radar-heat-map.md +1 -1
  261. package/extended/examples/radar-polar/radar-timeline.md +1 -1
  262. package/extended/examples/radar-polar/radar-with-date-axis.md +1 -1
  263. package/extended/examples/radar-polar/radial-bar-chart.md +1 -1
  264. package/extended/examples/radar-polar/radial-histogram.md +4 -12
  265. package/extended/examples/radar-polar/radial-line-graph.md +1 -1
  266. package/extended/examples/radar-polar/stacked-area-radar.md +2 -3
  267. package/extended/examples/radar-polar/variable-radius-radar.md +1 -1
  268. package/extended/examples/radar-polar/wheel-of-life.md +1 -1
  269. package/extended/examples/radar-polar/zoomable-radar.md +1 -1
  270. package/extended/examples/stock/changing-data-granularity.md +1 -1
  271. package/extended/examples/stock/live-stock-data.md +1 -1
  272. package/extended/examples/stock/separate-volume-panel.md +1 -1
  273. package/extended/examples/stock/stock-chart-comparing-prices.md +1 -1
  274. package/extended/examples/stock/stock-chart-with-bollinger-bands-indicator.md +1 -1
  275. package/extended/examples/stock/stock-chart-with-relative-strength-index.md +1 -1
  276. package/extended/examples/stock/stock-chart-with-volume-profile.md +1 -1
  277. package/extended/examples/stock/stock-chart.md +1 -1
  278. package/extended/examples/stock/stock-data-grouping.md +1 -1
  279. package/extended/examples/stock/stock-intraday-data.md +1 -1
  280. package/extended/examples/timeline/horizontal-serpentine-timeline.md +4 -6
  281. package/extended/examples/timeline/infinity-timeline.md +3 -3
  282. package/extended/examples/timeline/linear-process-diagram.md +1 -1
  283. package/extended/examples/timeline/serpentine-timeline-chart.md +4 -6
  284. package/extended/examples/timeline/spiral-timeline.md +3 -6
  285. package/extended/examples/timeline/stadium-track-chart.md +1 -1
  286. package/extended/examples/xy-bubble/animated-xy-bubble-timeline-chart.md +1 -1
  287. package/extended/examples/xy-bubble/beeswarm.md +1 -1
  288. package/extended/examples/xy-bubble/bubble-based-heat-map.md +4 -4
  289. package/extended/examples/xy-bubble/bubble-chart-with-pie-bullets.md +1 -1
  290. package/extended/examples/xy-bubble/bubble-chart.md +1 -1
  291. package/extended/examples/xy-bubble/irregular-interval-xy.md +1 -1
  292. package/extended/examples/xy-bubble/motion-chart.md +2 -5
  293. package/extended/examples/xy-bubble/scatter-chart.md +1 -1
  294. package/extended/examples/xy-bubble/scatter-plot-with-tens-of-thousands-points.md +7 -5
  295. package/extended/examples/xy-bubble/xy-chart-date-based-axis.md +1 -1
  296. package/extended/examples/xy-bubble/xy-chart-fills-axis.md +1 -1
  297. package/extended/examples/xy-bubble/xy-chart-value-based-line-graphs.md +1 -1
  298. package/extended/examples/xy-bubble/xy-error-chart.md +2 -5
  299. package/extended/examples/xy-bubble/zoomable-bubble-chart.md +2 -5
  300. package/extended/reference/animationoptions.md +1 -0
  301. package/extended/reference/chartserializer.md +10 -1
  302. package/extended/reference/entity.md +5 -2
  303. package/extended/reference/ichartserializersettings.md +12 -16
  304. package/extended/reference/ideclaredanimation.md +57 -0
  305. package/extended/reference/ieasinginfo.md +29 -0
  306. package/extended/reference/ientitysettings.md +5 -2
  307. package/extended/reference/imappointseriesdataitem.md +4 -2
  308. package/extended/reference/imappointseriessettings.md +7 -3
  309. package/extended/reference/iserializersettings.md +2 -1
  310. package/extended/reference/iseriesdataitem.md +1 -0
  311. package/extended/reference/iseriessettings.md +2 -0
  312. package/extended/reference/mappointseries.md +7 -3
  313. package/extended/reference/serializer.md +2 -1
  314. package/extended/reference/series.md +2 -0
  315. package/package.json +5 -2
@@ -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) {
@@ -60,27 +60,19 @@ Comment
60
60
 
61
61
  Remove the empty objects from the resulting JSON.
62
62
 
63
- `includeProjection`
64
-
65
- `boolean`
66
-
67
- `false`
68
-
69
- Include `projection` setting for `MapChart`.
70
-
71
63
  `includeStates`
72
64
 
73
65
  `boolean`
74
66
 
75
- `false`
67
+ `true`
76
68
 
77
69
  Include element and template states.
78
70
 
79
71
  `includeAdapters`
80
72
 
81
- boolean
73
+ `boolean`
82
74
 
83
- `false`
75
+ `true`
84
76
 
85
77
  Include adapters in the output.
86
78
 
@@ -100,43 +92,77 @@ Export functions as references or stringify them.
100
92
 
101
93
  Add a top-level `root` section with the `Root` object's settings and properties (`interfaceColors`, formatters, `utc`, `fps`, `tabindex`) to the output. `JsonParser` applies a `root` section before parsing the chart. *(5.20.2)*
102
94
 
103
- **What gets serialized (5.20.3+):** only **user-set** settings — theme and library defaults are left out, so the output is much smaller than in earlier versions and a value you never set will not appear. Chart-set values and data a chart builds for itself (a flow's nodes, a word cloud's words) are not written. Objects pointing at one another are written as references (e.g. `"@series.get('fill')"`) instead of copies, and big values (a map's `geoJSON`, a `Root`'s locale) are written as the name of the pack they came from and rebuilt on parse.
95
+ `runningAnimations`
96
+
97
+ `boolean`
98
+
99
+ `true`
100
+
101
+ Write an animation started in code that loops forever (`loops: Infinity`) into the element's `animations` setting, so the parsed chart plays it too. See "Animations" below. *(5.20.8)*
102
+
103
+ **What gets serialized (5.20.3+):** only **user-set** settings — theme and library defaults are left out, so the output is much smaller than in earlier versions and a value you never set will not appear. Chart-set values and data a chart builds for itself (a flow's nodes, a word cloud's words) are not written. Objects pointing at one another are written as references (e.g. `"@series.get('fill')"`) instead of copies, and big values (a map's `geoJSON`, a `Root`'s locale) are written as the name of the pack they came from and rebuilt on parse. Since 5.20.7 a map series' data rows no longer carry the properties the map copies onto them from its geodata (`name`, and on some maps `CNTRY`, `TYPE`) — only values that differ from the feature's are written, and a row left with nothing but its id is dropped.
104
104
 
105
- The below instructs serializer to include both states and adapters in the output:
105
+ Both states and adapters are included by default. The below instructs serializer to leave them out of the output:
106
106
 
107
107
  const serializer = am5plugins\_json.ChartSerializer.new(root, {
108
- includeAdapters: true,
109
- includeProjection: true
108
+ includeStates: false,
109
+ includeAdapters: false
110
110
  });
111
111
 
112
112
  var serializer = am5plugins\_json.ChartSerializer.new(root, {
113
- includeAdapters: true,
114
- includeProjection: true
113
+ includeStates: false,
114
+ includeAdapters: false
115
115
  });
116
116
 
117
+ ### Animations (5.20.8)
118
+
119
+ An element's `animations` setting (see "[Animations: Declarative animations](https://www.amcharts.com/docs/v5/concepts/animations/)") is written as configured. A setting one of its entries animates is written with the value it was configured with, never one caught mid-animation.
120
+
121
+ With `runningAnimations: true` (the default) *(5.20.8)*, an animation started in code with `animate()` that loops forever (`loops: Infinity`) and uses a named easing is written as an `animations` entry (`{ key, from, to, duration, loops: 0 }`, plus `easing`, `ease` and `yoyo` where they apply), and the setting it animates is left out of the output. A globe that keeps turning or a bullet that keeps pulsing thus plays on in the parsed chart.
122
+
123
+ Never written:
124
+
125
+ - Animations that end: `appear()`, state transitions, zooming, any `animate()` with a finite `loops`.
126
+ - Animations whose easing is a function of your own, a wrapped `am5.ease.pow`, or an easing that cannot be named (e.g. `am5.ease.out(am5.ease.yoyo(...))`). `am5.ease.easingInfo()` tells whether an easing has a name.
127
+ - As of 5.20.8, a loop started in code on a **data item** (e.g. `dataItem.animate({ key: "positionOnLine", loops: Infinity })`). Declare it as an `animations` entry with `target: "dataItem"` on the bullet's sprite instead.
128
+
129
+ To turn this off:
130
+
131
+ ```javascript
132
+ var serializer = am5plugins_json.ChartSerializer.new(root, {
133
+ runningAnimations: false
134
+ });
135
+ ```
136
+
117
137
  ### Including related elements
118
138
 
119
139
  #### Legend
120
140
 
121
141
  The serializer will detect `Legend` or `HeatLegend` and include it in the output if its a child of one of the chart's built-in containers, like `rightAxesContainer`, its series or the chart itself.
122
142
 
143
+ Since 5.20.7 a legend placed inside an axis header (`axisHeader`) round-trips too. Before, parsing such a config failed with "Could not find ref", because the legend names a series defined further down the config (see "[Grouping referenced objects](https://www.amcharts.com/docs/v5/concepts/serializing/#Grouping_referenced_objects)").
144
+
123
145
  #### Custom elements
124
146
 
125
147
  Custom elements, like labels and the like, will not be included in the output unless the have a `"serialize"` in their `themeTags`:
126
148
 
127
149
  pieSeries.children.push(am5.Label.new(root, {
128
- text: "Hello,
150
+ text: "Hello",
129
151
  x: am5.p50,
130
152
  y: am5.p50,
131
153
  themeTags: \["serialize"\]
132
- });
154
+ }));
133
155
 
134
156
  pieSeries.children.push(am5.Label.new(root, {
135
- text: "Hello,
157
+ text: "Hello",
136
158
  x: am5.p50,
137
159
  y: am5.p50,
138
160
  themeTags: \["serialize"\]
139
- });
161
+ }));
162
+
163
+ #### Theme tags (5.20.6)
164
+
165
+ Since 5.20.6 the `themeTags` you give an element are written to the output too, so anything styled through them (e.g. a `Button` with `themeTags: ["switch"]`) keeps that styling when the config is parsed again. Only tags passed to the element's `.new()` call are written — tags added later via `set("themeTags", …)`, and tags the library adds itself, are left out. On parse, the tags are added to the ones an existing element already has rather than replacing them.
140
166
 
141
167
  ## Supported chart types
142
168
 
@@ -155,15 +181,14 @@ pieSeries.children.push(am5.Label.new(root, {
155
181
 
156
182
  - Bullets (series or axis): No support for bullets that reference outside objects or context-based bullets (where bullet code depends on context to determine its appearance). Declare bullet factories as `function(root, series, dataItem)` — a factory that closes over an outer `root` dangles on re-bind.
157
183
  - Bullets or adapters that rely on global variables. Parser runs in a different scope, thus global variables might not be available.
158
- - **Adapters do not round-trip.** With `includeAdapters: true` each adapter is written as `{ key, callback: "function (…) {…}" }` (a string) — `JsonParser` does not turn it back into a function. Before 5.20.4 the string was registered as a callback and crashed the chart (`i[s] is not a function` in `Entity.fold`); since 5.20.4 such adapters are skipped on parse. Prefer declarative equivalents (`colorByDataItem` on column series, per-item `fill` + `templateField`, `heatRules`).
184
+ - **Adapters do not round-trip.** With `includeAdapters: true` (the default) each adapter is written as `{ key, callback: "function (…) {…}" }` (a string) — `JsonParser` does not turn it back into a function. Before 5.20.4 the string was registered as a callback and crashed the chart (`i[s] is not a function` in `Entity.fold`); since 5.20.4 such adapters are skipped on parse. Prefer declarative equivalents (`colorByDataItem` on column series, per-item `fill` + `templateField`, `heatRules`).
159
185
  - **Serialize the chart's top-level container child, not a bare series.** A series whose settings point back at itself (e.g. `selectedDataItem`, a `DataItem` whose `component` is the series) forms a cycle; serialized on its own it overflows `removeEmptyObjects` pruning or makes `JSON.stringify` throw "Converting circular structure". As a child of the serialized container it becomes a `#series-0` reference and the cycle disappears.
160
- - A bullet heat rule's throwaway sprite (created while the serializer introspects the bullet factory) has no `dataItem`; as of 5.20.5 the heat-rule loop then throws and, on a `LineSeries`, the stroke disappears. Have the factory call `sprite._setDataItem(dataItem)` or serialize before adding the rule.
186
+ - A bullet heat rule's throwaway sprite (created while the serializer introspects the bullet factory) has no `dataItem`; as of 5.20.8 the heat-rule loop then throws and, on a `LineSeries`, the stroke disappears. Have the factory call `sprite._setDataItem(dataItem)` or serialize before adding the rule.
161
187
 
162
188
  ### Unsupported features
163
189
 
164
- - Maps: Projections
190
+ - Maps: projections that are not registered by name. A projection set via `projectionName`, one of the bundled factories (`am5map.geoMercator()`, `am5map.geoOrthographic()`, etc.), or the factory returned by `am5map.registerProjection()` is written as `projectionName` and round-trips.
165
191
  - Bullets: Full charts in bullets
166
- - Axes: Legend inside axis header
167
192
  - Templates: `setup` function
168
193
  - Custom draw functions
169
194
  - Events
@@ -22,6 +22,7 @@ Supported features:
22
22
  - Properties
23
23
  - Settings
24
24
  - Adapters
25
+ - Declared animations — the `animations` setting *(5.20.8)*, see "[Animations](https://www.amcharts.com/docs/v5/concepts/animations/)". In a JSON config, colors and percents in an entry's `from`/`to` use the object form (`{ "type": "Color", "value": "#f00" }`, `{ "type": "Percent", "value": 50 }`).
25
26
 
26
27
  Unsupported features:
27
28
 
@@ -343,6 +344,8 @@ The items in the array will be processed one by one, so that references from the
343
344
 
344
345
  This way, a value can reference to any object from previous items.
345
346
 
347
+ Since 5.20.7, a setting or property value that names a ref defined further down the config (later in the same `refs` object, or in a later group) no longer fails with "Could not find ref" — it is resolved after the rest of the config has been parsed. This is what makes e.g. a legend inside an axis header that lists a series defined later work. Groups are still the way to make sure an object is fully built before something uses it, and they are still required for [axis range](#Axis_ranges) definitions: a range's `axis` and `series` are looked up immediately, so the referenced axis and series need to come first, in an earlier group.
348
+
346
349
  {
347
350
  type: "XYChart",
348
351
  refs: \[{
@@ -99,6 +99,30 @@ And the data:
99
99
  }\];
100
100
 
101
101
 
102
+ ## Backgrounds (5.20.7)
103
+
104
+ A container's `background` (e.g. the background of a `Label`) has no data item of its own. Since 5.20.7, a background that has its own `templateField` reads the data item of the container it belongs to, so a background can be set per data item — for example, a different label background on each bullet:
105
+
106
+ ```javascript
107
+ series.bullets.push(function (root, series, dataItem) {
108
+ return am5.Bullet.new(root, {
109
+ sprite: am5.Label.new(root, {
110
+ text: "{valueY}",
111
+ populateText: true,
112
+ background: am5.RoundedRectangle.new(root, {
113
+ templateField: "labelBg"
114
+ })
115
+ })
116
+ });
117
+ });
118
+
119
+ // Data
120
+ // { date: ..., value: 1000, labelBg: { fill: am5.color(0xff0000) } }
121
+ ```
122
+
123
+ Before 5.20.7 such a `templateField` on a background was never applied.
124
+
125
+
102
126
  ## Bullets
103
127
 
104
128
  There are some caveats involved when using template fields with bullets.
@@ -2,10 +2,11 @@
2
2
  title: "Box Plot Chart"
3
3
  source: "https://www.amcharts.com/demos/box-plot-chart/"
4
4
  category: "candlestick-ohlc"
5
- scraped: "2026-03-15"
5
+ scraped: "2026-09-29"
6
6
  ---
7
7
 
8
- Box plot chart (also know as boxplot, box-and-whisker plot, box-and-whisker diagram) is a way of displaying statistical data based on five numbers: minimum, first quartile (25th percent), median, third quartile (75th percent) and maximum.
8
+ Box plot chart (also known as boxplot, box-and-whisker plot, box-and-whisker diagram) is a way of displaying statistical data based on five numbers: minimum, first quartile (25th percentile), median, third quartile (75th percentile) and maximum.
9
+ In this JavaScript box plot, each day's distribution is drawn with a CandlestickSeries: the box spans the first to the third quartile, and the whiskers reach the minimum and maximum. The median is a StepLineSeries with noRisers: true, which draws a horizontal line inside each box.
9
10
  XY chart
10
11
  Candlestick series
11
12
  Step line series
@@ -65,32 +66,35 @@ var series = chart.series.push(
65
66
  am5xy.CandlestickSeries.new(root, {
66
67
  fill: color,
67
68
  stroke: color,
68
- name: "MDXI",
69
+ name: "Distribution",
69
70
  xAxis: xAxis,
70
71
  yAxis: yAxis,
71
- valueYField: "close",
72
- openValueYField: "open",
73
- lowValueYField: "low",
74
- highValueYField: "high",
72
+ // Box: first quartile (Q1) to third quartile (Q3); whiskers: minimum to maximum
73
+ valueYField: "q3",
74
+ openValueYField: "q1",
75
+ lowValueYField: "min",
76
+ highValueYField: "max",
75
77
  valueXField: "date",
76
78
  tooltip: am5.Tooltip.new(root, {
77
79
  pointerOrientation: "horizontal",
78
- labelText: "open: {openValueY}
79
- low: {lowValueY}
80
- high: {highValueY}
81
- close: {valueY},
82
- mediana: {mediana}"
80
+ labelText: "Max: {highValueY}\nQ3: {valueY}\nMedian: {median}\nQ1: {openValueY}\nMin: {lowValueY}"
83
81
  })
84
82
  })
85
83
  );
86
84
 
87
- // mediana series
88
- var medianaSeries = chart.series.push(
85
+ // Box plots use one colour: override the candlestick rise/drop colouring
86
+ var boxColor = chart.get("colors").getIndex(0);
87
+ am5.array.each(["riseFromOpen", "dropFromOpen", "riseFromPrevious", "dropFromPrevious"], function(state) {
88
+ series.columns.template.states.create(state, { fill: boxColor, stroke: boxColor });
89
+ });
90
+
91
+ // Median line inside each box
92
+ var medianSeries = chart.series.push(
89
93
  am5xy.StepLineSeries.new(root, {
90
94
  stroke: root.interfaceColors.get("background"),
91
95
  xAxis: xAxis,
92
96
  yAxis: yAxis,
93
- valueYField: "mediana",
97
+ valueYField: "median",
94
98
  valueXField: "date",
95
99
  noRisers: true
96
100
  })
@@ -103,95 +107,96 @@ var cursor = chart.set("cursor", am5xy.XYCursor.new(root, {
103
107
  }));
104
108
  cursor.lineY.set("visible", false);
105
109
 
110
+ // Five-number summary for each day: minimum, first quartile, median, third quartile, maximum
106
111
  var data = [
107
112
  {
108
- date: "2019-08-01",
109
- open: 132.3,
110
- high: 136.96,
111
- low: 131.15,
112
- close: 136.49
113
+ date: "2027-08-01",
114
+ min: 124.1,
115
+ q1: 129.6,
116
+ median: 132.2,
117
+ q3: 134.8,
118
+ max: 139.5
113
119
  },
114
120
  {
115
- date: "2019-08-02",
116
- open: 135.26,
117
- high: 135.95,
118
- low: 131.5,
119
- close: 131.85
121
+ date: "2027-08-02",
122
+ min: 122.8,
123
+ q1: 128.4,
124
+ median: 131.0,
125
+ q3: 133.9,
126
+ max: 140.2
120
127
  },
121
128
  {
122
- date: "2019-08-03",
123
- open: 129.9,
124
- high: 133.27,
125
- low: 128.3,
126
- close: 132.25
129
+ date: "2027-08-03",
130
+ min: 125.6,
131
+ q1: 130.1,
132
+ median: 133.4,
133
+ q3: 136.2,
134
+ max: 142.8
127
135
  },
128
136
  {
129
- date: "2019-08-04",
130
- open: 132.94,
131
- high: 136.24,
132
- low: 132.63,
133
- close: 135.03
137
+ date: "2027-08-04",
138
+ min: 127.3,
139
+ q1: 131.8,
140
+ median: 134.0,
141
+ q3: 137.5,
142
+ max: 144.1
134
143
  },
135
144
  {
136
- date: "2019-08-05",
137
- open: 136.76,
138
- high: 137.86,
139
- low: 132.0,
140
- close: 134.01
145
+ date: "2027-08-05",
146
+ min: 123.9,
147
+ q1: 129.2,
148
+ median: 131.7,
149
+ q3: 134.3,
150
+ max: 138.6
141
151
  },
142
152
  {
143
- date: "2019-08-06",
144
- open: 131.11,
145
- high: 133.0,
146
- low: 125.09,
147
- close: 126.39
153
+ date: "2027-08-06",
154
+ min: 121.4,
155
+ q1: 127.5,
156
+ median: 130.3,
157
+ q3: 133.1,
158
+ max: 137.9
148
159
  },
149
160
  {
150
- date: "2019-08-07",
151
- open: 130.11,
152
- high: 133.0,
153
- low: 125.09,
154
- close: 127.39
161
+ date: "2027-08-07",
162
+ min: 124.8,
163
+ q1: 130.6,
164
+ median: 133.9,
165
+ q3: 137.0,
166
+ max: 143.4
155
167
  },
156
168
  {
157
- date: "2019-08-08",
158
- open: 125.11,
159
- high: 126.0,
160
- low: 121.09,
161
- close: 122.39
169
+ date: "2027-08-08",
170
+ min: 126.2,
171
+ q1: 131.4,
172
+ median: 134.6,
173
+ q3: 138.1,
174
+ max: 145.0
162
175
  },
163
176
  {
164
- date: "2019-08-09",
165
- open: 131.11,
166
- high: 133.0,
167
- low: 122.09,
168
- close: 124.39
177
+ date: "2027-08-09",
178
+ min: 125.0,
179
+ q1: 130.2,
180
+ median: 132.8,
181
+ q3: 135.9,
182
+ max: 141.7
169
183
  }
170
184
  ];
171
185
 
172
- addMediana();
173
-
174
- function addMediana() {
175
- for (var i = 0; i < data.length; i++) {
176
- var dataItem = data[i];
177
- dataItem.mediana =
178
- Number(dataItem.low) + (Number(dataItem.high) - Number(dataItem.low)) / 2;
179
- }
180
- }
181
-
182
186
  series.data.processor = am5.DataProcessor.new(root, {
183
187
  dateFields: ["date"],
184
188
  dateFormat: "yyyy-MM-dd"
185
189
  });
186
190
 
187
191
  series.data.setAll(data);
188
- medianaSeries.data.setAll(data);
192
+ medianSeries.data.setAll(data);
189
193
 
190
194
  // Make stuff animate on load
191
195
  // https://www.amcharts.com/docs/v5/concepts/animations/
192
196
  series.appear(1000, 100);
193
- medianaSeries.appear(1000, 100);
194
- chart.appear(1000, 100);
197
+ medianSeries.appear(1000, 100);
198
+ chart.appear(1000, 100);
199
+
195
200
  ```
196
201
 
197
202
  ## HTML
@@ -2,7 +2,7 @@
2
2
  title: "Candlestick Chart"
3
3
  source: "https://www.amcharts.com/demos/candlestick-chart/"
4
4
  category: "candlestick-ohlc"
5
- scraped: "2026-03-15"
5
+ scraped: "2026-09-29"
6
6
  ---
7
7
 
8
8
  Candlestick chart is one of the most common ways to display financial data such as stock trading prices over time. Creating candlestick charts with amCharts is really easy and you get a lot of advanced features such as grouping right out of the box (try zooming in and out).
@@ -121,10 +121,7 @@ var series = chart.series.push(
121
121
  legendRangeValueText: "{valueYClose}",
122
122
  tooltip: am5.Tooltip.new(root, {
123
123
  pointerOrientation: "horizontal",
124
- labelText: "open: {openValueY}
125
- low: {lowValueY}
126
- high: {highValueY}
127
- close: {valueY}"
124
+ labelText: "open: {openValueY}\nlow: {lowValueY}\nhigh: {highValueY}\nclose: {valueY}"
128
125
  })
129
126
  })
130
127
  );