@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.
- package/content/SKILL.md +59 -11
- package/content/flow.md +3 -0
- package/content/map.md +35 -1
- package/content/pie.md +6 -0
- package/content/venn.md +3 -1
- package/content/xy.md +15 -1
- package/extended/charts/map-chart/map-line-series.md +110 -1
- package/extended/charts/map-chart/map-point-series.md +110 -1
- package/extended/charts/map-chart/map-polygon-series.md +47 -0
- package/extended/charts/xy-chart/axes/category-axis.md +2 -0
- package/extended/concepts/animations.md +136 -2
- package/extended/concepts/data.md +2 -0
- package/extended/concepts/serializing/chart-serializer.md +50 -25
- package/extended/concepts/serializing.md +3 -0
- package/extended/concepts/settings/template-fields.md +24 -0
- package/extended/examples/candlestick-ohlc/box-plot-chart.md +78 -73
- package/extended/examples/candlestick-ohlc/candlestick-chart.md +2 -5
- package/extended/examples/candlestick-ohlc/ohlc-chart.md +3 -6
- package/extended/examples/candlestick-ohlc/on-demand-data-loading.md +7 -7
- package/extended/examples/candlestick-ohlc/professional-candlesticks.md +3 -6
- package/extended/examples/candlestick-ohlc/stock-chart-candlesticks.md +1 -1
- package/extended/examples/column-bar/100-stacked-column-chart.md +3 -3
- package/extended/examples/column-bar/bar-and-line-chart-mix.md +3 -12
- package/extended/examples/column-bar/bar-chart-race.md +4 -11
- package/extended/examples/column-bar/bars-with-moving-bullets.md +1 -1
- package/extended/examples/column-bar/bullet-chart.md +1 -1
- package/extended/examples/column-bar/carbon-zero-progress.md +2 -3
- package/extended/examples/column-bar/clustered-bar-chart.md +3 -13
- package/extended/examples/column-bar/clustered-column-chart.md +2 -2
- package/extended/examples/column-bar/column-and-line-mix.md +1 -1
- package/extended/examples/column-bar/column-chart-images-top.md +4 -10
- package/extended/examples/column-bar/column-with-rotated-series.md +4 -11
- package/extended/examples/column-bar/columns-with-grainy-gradients.md +4 -5
- package/extended/examples/column-bar/columns-with-moving-bullets.md +1 -1
- package/extended/examples/column-bar/curved-columns.md +4 -10
- package/extended/examples/column-bar/divergent-stacked-bars.md +1 -10
- package/extended/examples/column-bar/drag-and-change-column-value.md +4 -11
- package/extended/examples/column-bar/drag-ordering-of-bars.md +1 -1
- package/extended/examples/column-bar/dumbbell-plot.md +1 -1
- package/extended/examples/column-bar/floating-bar-chart.md +2 -3
- package/extended/examples/column-bar/grouped-and-sorted-columns.md +4 -10
- package/extended/examples/column-bar/grouped-stacks.md +1 -1
- package/extended/examples/column-bar/heat-map-with-legend.md +8 -8
- package/extended/examples/column-bar/horizontal-dumbbell-plot.md +1 -1
- package/extended/examples/column-bar/images-as-categories.md +16 -18
- package/extended/examples/column-bar/layered-column-chart.md +1 -1
- package/extended/examples/column-bar/lollipop-chart.md +1 -1
- package/extended/examples/column-bar/pareto-diagram.md +4 -7
- package/extended/examples/column-bar/partitioned-bar-chart.md +1 -1
- package/extended/examples/column-bar/pictorial-column-chart.md +1 -1
- package/extended/examples/column-bar/real-time-data-sorting.md +4 -11
- package/extended/examples/column-bar/risk-heatmap.md +9 -9
- package/extended/examples/column-bar/simple-column-chart.md +3 -3
- package/extended/examples/column-bar/sorted-bar-chart.md +4 -12
- package/extended/examples/column-bar/stacked-bar-chart-with-negative-values.md +1 -1
- package/extended/examples/column-bar/stacked-bar-chart.md +1 -1
- package/extended/examples/column-bar/stacked-clustered-column-chart.md +1 -1
- package/extended/examples/column-bar/stacked-column-chart.md +1 -1
- package/extended/examples/column-bar/stacked-waterfall-chart.md +1 -1
- package/extended/examples/column-bar/step-count-chart.md +1 -1
- package/extended/examples/column-bar/variance-indicators.md +1 -1
- package/extended/examples/column-bar/waffle-chart.md +1 -1
- package/extended/examples/column-bar/waterfall-chart.md +1 -1
- package/extended/examples/dashboards/maps-and-charts-dashboard.md +1 -1
- package/extended/examples/dashboards/road-trip-dashboard-with-map.md +24 -23
- package/extended/examples/flow/animated-sankey-diagram.md +200 -202
- package/extended/examples/flow/chord-diagram-with-animated-bullets.md +4 -2
- package/extended/examples/flow/chord-diagram.md +6 -4
- package/extended/examples/flow/horizontal-arc-diagram.md +4 -2
- package/extended/examples/flow/non-ribbon-chord-diagram.md +6 -4
- package/extended/examples/flow/sankey-diagram.md +4 -2
- package/extended/examples/flow/toggleable-chord-diagram.md +4 -2
- package/extended/examples/flow/traceable-sankey-diagram.md +4 -2
- package/extended/examples/flow/vertical-arc-diagram.md +4 -2
- package/extended/examples/flow/vertical-sankey-diagram.md +11 -19
- package/extended/examples/funnel-pyramid/funnel-chart-with-rounded-corners.md +1 -1
- package/extended/examples/funnel-pyramid/funnel-chart.md +1 -1
- package/extended/examples/funnel-pyramid/funnel-with-gradient-fill.md +1 -1
- package/extended/examples/funnel-pyramid/horizontal-funnel.md +1 -1
- package/extended/examples/funnel-pyramid/horizontal-pictorial-chart.md +1 -1
- package/extended/examples/funnel-pyramid/pictorial-chart.md +1 -1
- package/extended/examples/funnel-pyramid/pictorial-fraction-chart.md +1 -1
- package/extended/examples/funnel-pyramid/pictorial-stacked-chart.md +1 -1
- package/extended/examples/funnel-pyramid/pyramid-chart.md +1 -1
- package/extended/examples/gantt/editable-multilevel-gantt-chart.md +1 -1
- package/extended/examples/gantt/gantt-chart-dates.md +1 -1
- package/extended/examples/gantt/gantt-chart-in-read-only-mode.md +1 -1
- package/extended/examples/gantt/gantt-chart-playground.md +4 -3
- package/extended/examples/gantt/gantt-chart.md +1 -1
- package/extended/examples/gantt/gantt-with-hundreds-of-items.md +1 -1
- package/extended/examples/gauges/angular-gauge-with-two-axes.md +1 -1
- package/extended/examples/gauges/angular-gauge.md +1 -1
- package/extended/examples/gauges/animated-gauge.md +1 -1
- package/extended/examples/gauges/clock-with-two-faces.md +1 -1
- package/extended/examples/gauges/clock.md +1 -1
- package/extended/examples/gauges/compass-chart.md +1 -1
- package/extended/examples/gauges/gauge-with-bands.md +1 -1
- package/extended/examples/gauges/gauge-with-gradient-fill.md +1 -1
- package/extended/examples/gauges/multi-part-gauge.md +1 -1
- package/extended/examples/gauges/solid-gauge.md +1 -1
- package/extended/examples/gauges/yes-and-no-gauge.md +1 -1
- package/extended/examples/hierarchy/collapsible-force-directed-tree.md +3 -3
- package/extended/examples/hierarchy/drill-down-sunburst-chart.md +4 -4
- package/extended/examples/hierarchy/drill-down-treemap.md +5 -5
- package/extended/examples/hierarchy/dynamic-data-updates-on-treemap.md +4 -4
- package/extended/examples/hierarchy/force-directed-adding-links.md +4 -4
- package/extended/examples/hierarchy/force-directed-network.md +4 -4
- package/extended/examples/hierarchy/force-directed-tree-with-animated-bullets.md +11 -10
- package/extended/examples/hierarchy/force-directed-tree.md +3 -3
- package/extended/examples/hierarchy/horizontal-partition-chart.md +3 -3
- package/extended/examples/hierarchy/multilevel-tree-map.md +11 -10
- package/extended/examples/hierarchy/packed-circle-chart.md +3 -3
- package/extended/examples/hierarchy/rectangular-voronoi-tree-map.md +4 -2
- package/extended/examples/hierarchy/simple-treemap.md +4 -4
- package/extended/examples/hierarchy/single-level-packed-circles.md +11 -10
- package/extended/examples/hierarchy/sunburst-chart.md +3 -3
- package/extended/examples/hierarchy/sunburst-flavor-wheel.md +18 -21
- package/extended/examples/hierarchy/tree-chart.md +11 -10
- package/extended/examples/hierarchy/vertical-partition-chart.md +3 -3
- package/extended/examples/hierarchy/voronoi-treemap.md +11 -10
- package/extended/examples/hierarchy/zoomable-force-directed-tree.md +11 -10
- package/extended/examples/line-area/100-stacked-area-chart.md +3 -4
- package/extended/examples/line-area/animated-bullet-at-the-end-of-the-series.md +1 -1
- package/extended/examples/line-area/area-with-time-based-data.md +2 -3
- package/extended/examples/line-area/chart-with-gaps-in-data.md +2 -3
- package/extended/examples/line-area/comparing-different-date-values-google-analytics-style.md +2 -3
- package/extended/examples/line-area/control-chart.md +1 -1
- package/extended/examples/line-area/data-grouping-50k-points.md +1 -2
- package/extended/examples/line-area/date-axis-with-labels-near-minor-grid-lines.md +1 -1
- package/extended/examples/line-area/date-based-data.md +1 -1
- package/extended/examples/line-area/date-based-line-chart.md +4 -4
- package/extended/examples/line-area/divergent-lines.md +2 -3
- package/extended/examples/line-area/draggable-range-with-close-button.md +1 -1
- package/extended/examples/line-area/drawing-chart-series-with-mouse-or-touch.md +1 -1
- package/extended/examples/line-area/duration-on-value-axis.md +8 -8
- package/extended/examples/line-area/error-chart.md +2 -3
- package/extended/examples/line-area/evenly-spaced-date-axis.md +1 -1
- package/extended/examples/line-area/highlighting-line-chart-series-on-legend-hover.md +1 -1
- package/extended/examples/line-area/line-chart-adding-data-every-second.md +1 -1
- package/extended/examples/line-area/line-chart-with-horizontal-target.md +1 -1
- package/extended/examples/line-area/line-chart-with-range-slider.md +1 -1
- package/extended/examples/line-area/line-chart-with-scroll-and-zoom.md +1 -1
- package/extended/examples/line-area/line-different-colors-ups-downs.md +1 -1
- package/extended/examples/line-area/line-graph.md +1 -1
- package/extended/examples/line-area/line-with-changing-color.md +1 -1
- package/extended/examples/line-area/line-with-custom-bullets.md +21 -18
- package/extended/examples/line-area/line-with-data-labels.md +1 -1
- package/extended/examples/line-area/live-data.md +1 -1
- package/extended/examples/line-area/live-order-book-depth-chart.md +9 -15
- package/extended/examples/line-area/logarithmic-scale.md +1 -1
- package/extended/examples/line-area/manipulate-chart-data-with-mouse.md +1 -1
- package/extended/examples/line-area/mixed-daily-and-intra-day-chart.md +1 -1
- package/extended/examples/line-area/multiple-date-axes.md +1 -1
- package/extended/examples/line-area/multiple-value-axes.md +1 -1
- package/extended/examples/line-area/no-gap-date-axis.md +1 -1
- package/extended/examples/line-area/process-control-chart.md +1 -1
- package/extended/examples/line-area/range-area-chart.md +1 -1
- package/extended/examples/line-area/range-chart-with-different-fill-colors.md +2 -2
- package/extended/examples/line-area/reversed-value-axis.md +2 -3
- package/extended/examples/line-area/selecting-and-marking-multiple-ranges.md +1 -2
- package/extended/examples/line-area/show-percentage-change.md +1 -1
- package/extended/examples/line-area/smoothed-line-chart.md +1 -1
- package/extended/examples/line-area/smoothed-stacked-area.md +2 -3
- package/extended/examples/line-area/spline-graph.md +1 -1
- package/extended/examples/line-area/stacked-area.md +2 -3
- package/extended/examples/line-area/step-line-chart.md +1 -1
- package/extended/examples/line-area/step-line-without-risers.md +1 -1
- package/extended/examples/line-area/stream-chart.md +2 -3
- package/extended/examples/line-area/trend-lines.md +1 -1
- package/extended/examples/line-area/vertical-line-chart.md +1 -1
- package/extended/examples/line-area/zoomable-value-axis.md +6 -6
- package/extended/examples/maps/animations-along-lines.md +34 -28
- package/extended/examples/maps/approximate-working-hours-map.md +9 -1
- package/extended/examples/maps/capitals-map.md +363 -911
- package/extended/examples/maps/changing-map-projection.md +7 -6
- package/extended/examples/maps/day-and-night-world-map.md +172 -532
- package/extended/examples/maps/drill-down-congressional-map.md +2 -2
- package/extended/examples/maps/drill-down-map.md +4 -4
- package/extended/examples/maps/drill-down-to-countries.md +6 -6
- package/extended/examples/maps/flight-routes-map.md +9 -1
- package/extended/examples/maps/grouped-countries-map.md +2 -3
- package/extended/examples/maps/location-sensitive-map.md +2 -1
- package/extended/examples/maps/map-bubbles.md +11 -3
- package/extended/examples/maps/map-dynamic-pie-charts.md +1 -1
- package/extended/examples/maps/map-image-drill-down.md +14 -15
- package/extended/examples/maps/map-sankey-series.md +22 -0
- package/extended/examples/maps/map-timeline.md +1 -1
- package/extended/examples/maps/map-using-d3-projections.md +1 -1
- package/extended/examples/maps/map-with-animated-bubbles.md +4 -2
- package/extended/examples/maps/map-with-animated-lines.md +38 -26
- package/extended/examples/maps/map-with-curved-lines.md +35 -25
- package/extended/examples/maps/map-with-patterns.md +9 -4
- package/extended/examples/maps/map-with-pulsating-bullets.md +9 -13
- package/extended/examples/maps/map-with-sized-pin-bullets.md +1 -1
- package/extended/examples/maps/multi-series-map.md +5 -4
- package/extended/examples/maps/pacific-centered-map.md +2 -1
- package/extended/examples/maps/rotate-globe-to-a-selected-country.md +200 -29
- package/extended/examples/maps/rotating-globe-with-circles.md +19 -2
- package/extended/examples/maps/rotating-globe.md +77 -20
- package/extended/examples/maps/selecting-multiple-areas-map.md +1 -1
- package/extended/examples/maps/solar-eclipse-map.md +12 -7
- package/extended/examples/maps/trumps-reciprocal-tariffs-map.md +1 -1
- package/extended/examples/maps/us-congressional-districts.md +19 -10
- package/extended/examples/maps/us-heat-map.md +1 -1
- package/extended/examples/maps/weather-map.md +1 -1
- package/extended/examples/maps/world-map-with-clustered-points.md +2 -1
- package/extended/examples/maps/world-time-zone-map.md +2 -1
- package/extended/examples/maps/zooming-to-countries-map.md +91 -15
- package/extended/examples/miscellaneous/annotating-charts.md +3 -3
- package/extended/examples/miscellaneous/changing-data-word-cloud.md +4 -2
- package/extended/examples/miscellaneous/combined-bullet-column-line-chart.md +1 -1
- package/extended/examples/miscellaneous/complex-venn-diagram.md +9 -22
- package/extended/examples/miscellaneous/exporting-chart-to-image.md +1 -1
- package/extended/examples/miscellaneous/forest-plot.md +5 -5
- package/extended/examples/miscellaneous/historical-population-pyramid.md +2 -4
- package/extended/examples/miscellaneous/honeycomb-tile-map.md +1 -1
- package/extended/examples/miscellaneous/horizontally-stacked-axes.md +1 -1
- package/extended/examples/miscellaneous/hybrid-drill-down-pie-bar-chart.md +4 -4
- package/extended/examples/miscellaneous/infographic.md +1 -1
- package/extended/examples/miscellaneous/mekko.md +1 -1
- package/extended/examples/miscellaneous/micro-charts-sparklines.md +1 -1
- package/extended/examples/miscellaneous/pictogram.md +3 -5
- package/extended/examples/miscellaneous/population-pyramid.md +1 -1
- package/extended/examples/miscellaneous/progress-chart.md +2 -2
- package/extended/examples/miscellaneous/range-bullet-chart.md +1 -1
- package/extended/examples/miscellaneous/sentence-cloud.md +10 -19
- package/extended/examples/miscellaneous/spectrum-chart.md +4 -4
- package/extended/examples/miscellaneous/strip-plot.md +1 -1
- package/extended/examples/miscellaneous/tag-cloud.md +5 -4
- package/extended/examples/miscellaneous/tile-map.md +1 -1
- package/extended/examples/miscellaneous/venn-diagram-with-patterns.md +8 -8
- package/extended/examples/miscellaneous/venn-diagram.md +8 -8
- package/extended/examples/miscellaneous/vertically-stacked-axes-chart.md +1 -1
- package/extended/examples/miscellaneous/violin-chart.md +1 -1
- package/extended/examples/miscellaneous/word-cloud.md +11 -10
- package/extended/examples/pie-donut/animated-time-line-pie-chart.md +1 -1
- package/extended/examples/pie-donut/donut-chart.md +1 -1
- package/extended/examples/pie-donut/donut-with-radial-gradient.md +2 -2
- package/extended/examples/pie-donut/dragging-pie-slices.md +1 -1
- package/extended/examples/pie-donut/grained-gradient-pie.md +1 -1
- package/extended/examples/pie-donut/nested-donut-chart.md +4 -4
- package/extended/examples/pie-donut/pie-chart-broken-slices.md +1 -1
- package/extended/examples/pie-donut/pie-chart-with-legend.md +1 -1
- package/extended/examples/pie-donut/pie-chart.md +3 -3
- package/extended/examples/pie-donut/pie-of-a-pie.md +1 -1
- package/extended/examples/pie-donut/semi-circle-pie-chart.md +1 -1
- package/extended/examples/pie-donut/simple-pie-chart.md +4 -3
- package/extended/examples/pie-donut/two-level-pie-chart.md +1 -1
- package/extended/examples/pie-donut/two-pie-charts-with-single-legend.md +1 -1
- package/extended/examples/pie-donut/variable-radius-nested-donut-chart.md +2 -3
- package/extended/examples/pie-donut/variable-radius-nested-pie.md +1 -1
- package/extended/examples/pie-donut/variable-radius-pie-chart.md +1 -1
- package/extended/examples/radar-polar/flower-chart.md +1 -1
- package/extended/examples/radar-polar/live-sorting-of-radar-columns.md +4 -11
- package/extended/examples/radar-polar/polar-area-chart.md +1 -1
- package/extended/examples/radar-polar/polar-chart.md +1 -1
- package/extended/examples/radar-polar/polar-scatter.md +1 -1
- package/extended/examples/radar-polar/radar-chart-visualizing-yearly-activities.md +3 -4
- package/extended/examples/radar-polar/radar-chart.md +1 -1
- package/extended/examples/radar-polar/radar-heat-map.md +1 -1
- package/extended/examples/radar-polar/radar-timeline.md +1 -1
- package/extended/examples/radar-polar/radar-with-date-axis.md +1 -1
- package/extended/examples/radar-polar/radial-bar-chart.md +1 -1
- package/extended/examples/radar-polar/radial-histogram.md +4 -12
- package/extended/examples/radar-polar/radial-line-graph.md +1 -1
- package/extended/examples/radar-polar/stacked-area-radar.md +2 -3
- package/extended/examples/radar-polar/variable-radius-radar.md +1 -1
- package/extended/examples/radar-polar/wheel-of-life.md +1 -1
- package/extended/examples/radar-polar/zoomable-radar.md +1 -1
- package/extended/examples/stock/changing-data-granularity.md +1 -1
- package/extended/examples/stock/live-stock-data.md +1 -1
- package/extended/examples/stock/separate-volume-panel.md +1 -1
- package/extended/examples/stock/stock-chart-comparing-prices.md +1 -1
- package/extended/examples/stock/stock-chart-with-bollinger-bands-indicator.md +1 -1
- package/extended/examples/stock/stock-chart-with-relative-strength-index.md +1 -1
- package/extended/examples/stock/stock-chart-with-volume-profile.md +1 -1
- package/extended/examples/stock/stock-chart.md +1 -1
- package/extended/examples/stock/stock-data-grouping.md +1 -1
- package/extended/examples/stock/stock-intraday-data.md +1 -1
- package/extended/examples/timeline/horizontal-serpentine-timeline.md +4 -6
- package/extended/examples/timeline/infinity-timeline.md +3 -3
- package/extended/examples/timeline/linear-process-diagram.md +1 -1
- package/extended/examples/timeline/serpentine-timeline-chart.md +4 -6
- package/extended/examples/timeline/spiral-timeline.md +3 -6
- package/extended/examples/timeline/stadium-track-chart.md +1 -1
- package/extended/examples/xy-bubble/animated-xy-bubble-timeline-chart.md +1 -1
- package/extended/examples/xy-bubble/beeswarm.md +1 -1
- package/extended/examples/xy-bubble/bubble-based-heat-map.md +4 -4
- package/extended/examples/xy-bubble/bubble-chart-with-pie-bullets.md +1 -1
- package/extended/examples/xy-bubble/bubble-chart.md +1 -1
- package/extended/examples/xy-bubble/irregular-interval-xy.md +1 -1
- package/extended/examples/xy-bubble/motion-chart.md +2 -5
- package/extended/examples/xy-bubble/scatter-chart.md +1 -1
- package/extended/examples/xy-bubble/scatter-plot-with-tens-of-thousands-points.md +7 -5
- package/extended/examples/xy-bubble/xy-chart-date-based-axis.md +1 -1
- package/extended/examples/xy-bubble/xy-chart-fills-axis.md +1 -1
- package/extended/examples/xy-bubble/xy-chart-value-based-line-graphs.md +1 -1
- package/extended/examples/xy-bubble/xy-error-chart.md +2 -5
- package/extended/examples/xy-bubble/zoomable-bubble-chart.md +2 -5
- package/extended/reference/animationoptions.md +1 -0
- package/extended/reference/chartserializer.md +10 -1
- package/extended/reference/entity.md +5 -2
- package/extended/reference/ichartserializersettings.md +12 -16
- package/extended/reference/ideclaredanimation.md +57 -0
- package/extended/reference/ieasinginfo.md +29 -0
- package/extended/reference/ientitysettings.md +5 -2
- package/extended/reference/imappointseriesdataitem.md +4 -2
- package/extended/reference/imappointseriessettings.md +7 -3
- package/extended/reference/iserializersettings.md +2 -1
- package/extended/reference/iseriesdataitem.md +1 -0
- package/extended/reference/iseriessettings.md +2 -0
- package/extended/reference/mappointseries.md +7 -3
- package/extended/reference/serializer.md +2 -1
- package/extended/reference/series.md +2 -0
- package/package.json +5 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "OHLC Chart"
|
|
3
3
|
source: "https://www.amcharts.com/demos/ohlc-chart/"
|
|
4
4
|
category: "candlestick-ohlc"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
The OHLC chart is a very popular way to display financial (and other) data over time with open, high, low, and close values for periods.
|
|
@@ -115,10 +115,7 @@ var series = chart.series.push(am5xy.OHLCSeries.new(root, {
|
|
|
115
115
|
legendRangeValueText: "{valueYClose}",
|
|
116
116
|
tooltip: am5.Tooltip.new(root, {
|
|
117
117
|
pointerOrientation: "horizontal",
|
|
118
|
-
labelText: "open: {openValueY}
|
|
119
|
-
low: {lowValueY}
|
|
120
|
-
high: {highValueY}
|
|
121
|
-
close: {valueY}"
|
|
118
|
+
labelText: "open: {openValueY}\nlow: {lowValueY}\nhigh: {highValueY}\nclose: {valueY}"
|
|
122
119
|
})
|
|
123
120
|
}));
|
|
124
121
|
|
|
@@ -170,7 +167,7 @@ var sbseries = scrollbar.chart.series.push(am5xy.LineSeries.new(root, {
|
|
|
170
167
|
|
|
171
168
|
// Add legend
|
|
172
169
|
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
|
173
|
-
var legend =
|
|
170
|
+
var legend = chart.plotContainer.children.push(
|
|
174
171
|
am5.Legend.new(root, {})
|
|
175
172
|
);
|
|
176
173
|
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
title: "On-Demand Data Loading"
|
|
3
3
|
source: "https://www.amcharts.com/demos/on-demand-data-loading/"
|
|
4
4
|
category: "candlestick-ohlc"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
This demo shows a sample Stock chart setup which can load its data on-demand.
|
|
9
9
|
Try panning the chart chart, zooming, switching granularity. The code will gracefully handle loading missing data from the backend.
|
|
10
10
|
It relies on a few of the technologies implemented in amCharts 5:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
Incremental data loading
|
|
12
|
+
CSV data loading and parsing
|
|
13
|
+
Stacked axes
|
|
14
|
+
Incremental on-demand data loading (commentary about the code behind this demo)
|
|
15
|
+
Stacked axes
|
|
16
|
+
XY chart
|
|
17
17
|
|
|
18
18
|
## JavaScript
|
|
19
19
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Professional Candlesticks"
|
|
3
3
|
source: "https://www.amcharts.com/demos/professional-candlesticks/"
|
|
4
4
|
category: "candlestick-ohlc"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Professional candlestick chart is similar to the "regular" candlestick chart but applies different coloring logic. You may notice that some candlesticks are filled and some are hollow. More about this type of candlesticks can be found in the docs.
|
|
@@ -120,10 +120,7 @@ var series = chart.series.push(
|
|
|
120
120
|
legendRangeValueText: "{valueYClose}",
|
|
121
121
|
tooltip: am5.Tooltip.new(root, {
|
|
122
122
|
pointerOrientation: "horizontal",
|
|
123
|
-
labelText: "open: {openValueY}
|
|
124
|
-
low: {lowValueY}
|
|
125
|
-
high: {highValueY}
|
|
126
|
-
close: {valueY}"
|
|
123
|
+
labelText: "open: {openValueY}\nlow: {lowValueY}\nhigh: {highValueY}\nclose: {valueY}"
|
|
127
124
|
})
|
|
128
125
|
})
|
|
129
126
|
);
|
|
@@ -183,7 +180,7 @@ var sbseries = scrollbar.chart.series.push(
|
|
|
183
180
|
|
|
184
181
|
// Add legend
|
|
185
182
|
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
|
186
|
-
var legend =
|
|
183
|
+
var legend = chart.plotContainer.children.push(am5.Legend.new(root, {}));
|
|
187
184
|
|
|
188
185
|
legend.data.push(series);
|
|
189
186
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Stock Chart Candlesticks"
|
|
3
3
|
source: "https://www.amcharts.com/demos/stock-chart-candlesticks/"
|
|
4
4
|
category: "candlestick-ohlc"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You can create your typical stock charts with amCharts XYChart. In this example we create a candlestick stock price graph and a volume graph under it.
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
title: "100% Stacked Column Chart"
|
|
3
3
|
source: "https://www.amcharts.com/demos/100-stacked-column-chart/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
100% stacked column or bar chart is a good way to display some categories of a whole changing over time. For example, a company may use 100% stacked column chart to display what product lines contributed to its revenue by calendar quarter. The downside is that in such a chart it is quite difficult to visually compare the changes over time (except for the first item/series).
|
|
9
9
|
Key implementation details
|
|
10
10
|
You don't need to perform percentage calculations in your code. You can pass your real values to amCharts and the chart will do the rest. For this purpose, we enable calculateTotals (more info here) on the value axis (the Y-axis in this case) and set its range to 0 to 100 (plus enforce it with strictMinMax to disable "smart" min/max features).
|
|
11
11
|
Then, in our series we set the valueYField to our real value, as usual. But after that we take advantage of the "Display fields" feature in amCharts. Display fields allow us to reference derivative calculated values instead of raw values from our data set. In this case we want to set our respective display field (valueYFieldShow) to display the percentage share of our real value. For this we set it to the valueYTotalPercent calculated field.
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
Calculated values on value axes
|
|
13
|
+
Display fields - a way to show alternative values
|
|
14
14
|
|
|
15
15
|
## JavaScript
|
|
16
16
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Bar and Line Chart Mix"
|
|
3
3
|
source: "https://www.amcharts.com/demos/bar-and-line-chart-mix/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Mixing bar and line chart in the same visual is a good way to emphasize the difference between series while still maintaining their relationship.
|
|
@@ -40,13 +40,6 @@ var chart = root.container.children.push(am5xy.XYChart.new(root, {
|
|
|
40
40
|
}));
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
// Add legend
|
|
44
|
-
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
|
45
|
-
var legend = chart.children.push(am5.Legend.new(root, {
|
|
46
|
-
centerX: am5.p50,
|
|
47
|
-
x: am5.p50
|
|
48
|
-
}))
|
|
49
|
-
|
|
50
43
|
var data = [{
|
|
51
44
|
"year": "2005",
|
|
52
45
|
"income": 23.5,
|
|
@@ -112,8 +105,7 @@ var series1 = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
112
105
|
sequencedInterpolation: true,
|
|
113
106
|
tooltip: am5.Tooltip.new(root, {
|
|
114
107
|
pointerOrientation: "horizontal",
|
|
115
|
-
labelText: "[bold]{name}[/]
|
|
116
|
-
{categoryY}: {valueX}"
|
|
108
|
+
labelText: "[bold]{name}[/]\n{categoryY}: {valueX}"
|
|
117
109
|
})
|
|
118
110
|
}));
|
|
119
111
|
|
|
@@ -131,8 +123,7 @@ var series2 = chart.series.push(am5xy.LineSeries.new(root, {
|
|
|
131
123
|
sequencedInterpolation: true,
|
|
132
124
|
tooltip: am5.Tooltip.new(root, {
|
|
133
125
|
pointerOrientation: "horizontal",
|
|
134
|
-
labelText: "[bold]{name}[/]
|
|
135
|
-
{categoryY}: {valueX}"
|
|
126
|
+
labelText: "[bold]{name}[/]\n{categoryY}: {valueX}"
|
|
136
127
|
})
|
|
137
128
|
}));
|
|
138
129
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Bar Chart Race"
|
|
3
3
|
source: "https://www.amcharts.com/demos/bar-chart-race/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Bar Chart Race is a great and highly visual way to display data changing over time in the form of an animated bar chart. It's a very comprehensible representation of time-based changes in data.
|
|
@@ -450,21 +450,14 @@ var series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
450
450
|
xAxis: xAxis,
|
|
451
451
|
yAxis: yAxis,
|
|
452
452
|
valueXField: "value",
|
|
453
|
-
categoryYField: "network"
|
|
453
|
+
categoryYField: "network",
|
|
454
|
+
// Each column takes its own color from the series palette
|
|
455
|
+
colorByDataItem: true
|
|
454
456
|
}));
|
|
455
457
|
|
|
456
458
|
// Rounded corners for columns
|
|
457
459
|
series.columns.template.setAll({ cornerRadiusBR: 5, cornerRadiusTR: 5 });
|
|
458
460
|
|
|
459
|
-
// Make each column to be of a different color
|
|
460
|
-
series.columns.template.adapters.add("fill", function (fill, target) {
|
|
461
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
462
|
-
});
|
|
463
|
-
|
|
464
|
-
series.columns.template.adapters.add("stroke", function (stroke, target) {
|
|
465
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
466
|
-
});
|
|
467
|
-
|
|
468
461
|
// Add label bullet
|
|
469
462
|
series.bullets.push(function () {
|
|
470
463
|
return am5.Bullet.new(root, {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Bars with Moving Bullets"
|
|
3
3
|
source: "https://www.amcharts.com/demos/bars-with-moving-bullets/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Interactivity is a great way to direct viewers attention in visualizations. amCharts 5 helps you implement moving bullets in a conservative but effective bar chart to make it way more appealing without sacrificing the maximum comprehension level of this classic chart type.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Bullet Chart"
|
|
3
3
|
source: "https://www.amcharts.com/demos/bullet-chart/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Bullet Chart (also know as Bullet graph) is a great replacement for traditional dashboard gauges and meters. It empowers to display way more information in a more compact space by getting rid of unnecessary decoration in favor of data clarity and usability.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Carbon-zero Progress"
|
|
3
3
|
source: "https://www.amcharts.com/demos/carbon-zero-progress/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
amCharts flexibility allows you to go way beyond canonical chart types and use our libraries to build vast variety of data visualizations. In this demo we use the XY chart to implement a beautiful progress bar.
|
|
@@ -248,8 +248,7 @@ series.bullets.push(function(root, target, dataItem) {
|
|
|
248
248
|
}));
|
|
249
249
|
|
|
250
250
|
var label = container.children.push(am5.Label.new(root, {
|
|
251
|
-
text: "GOAL
|
|
252
|
-
[bold]ZERO[/]",
|
|
251
|
+
text: "GOAL\n[bold]ZERO[/]",
|
|
253
252
|
textAlign: "center",
|
|
254
253
|
//fontSize: "10",
|
|
255
254
|
fill: am5.color(0xffffff),
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
title: "Clustered Bar Chart"
|
|
3
3
|
source: "https://www.amcharts.com/demos/clustered-bar-chart/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Clustered Bar Chart (also known as Grouped bar chart, Multi-series bar chart) is great for displaying and comparing multiple sets of data over the same categories (like sales revenue of various departments of the company over several years).
|
|
9
9
|
Key implementation details
|
|
10
10
|
Clustered is the default behavior for the column/bar chart, so you don't have to do anything extra to achieve the "clustering".
|
|
11
|
-
To make a horizontal Bar chart (as opposed to a vertical Column chart) we set yAxis to be a CategoryAxis and xAxis to a ValueAxis. Accordingly, we set valueXField and categoryYField properties on the series, so they know that categories go along the Y axis and values along the X.
|
|
11
|
+
To make a horizontal Bar chart (as opposed to a vertical Column chart) we set yAxis to be a CategoryAxis and xAxis to a ValueAxis. Accordingly, we set valueXField and categoryYField properties on the series, so they know that categories go along the Y axis and values along the X.
|
|
12
12
|
Normally, axes start at the 0 point (bottom-left) but in this case we wanted years to go from top to bottom. To achieve this, we've set inversed: true on the category axis renderer.
|
|
13
13
|
Finally, to make bars appear in a sequenced animation (one-by-one and not all at once) we enable sequencedInterpolation on the series.
|
|
14
14
|
XY chart axes
|
|
@@ -42,15 +42,6 @@ var chart = root.container.children.push(am5xy.XYChart.new(root, {
|
|
|
42
42
|
layout: root.verticalLayout
|
|
43
43
|
}));
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
// Add legend
|
|
47
|
-
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
|
48
|
-
var legend = chart.children.push(am5.Legend.new(root, {
|
|
49
|
-
centerX: am5.p50,
|
|
50
|
-
x: am5.p50
|
|
51
|
-
}))
|
|
52
|
-
|
|
53
|
-
|
|
54
45
|
// Data
|
|
55
46
|
var data = [{
|
|
56
47
|
year: "2017",
|
|
@@ -110,8 +101,7 @@ function createSeries(field, name) {
|
|
|
110
101
|
sequencedInterpolation: true,
|
|
111
102
|
tooltip: am5.Tooltip.new(root, {
|
|
112
103
|
pointerOrientation: "horizontal",
|
|
113
|
-
labelText: "[bold]{name}[/]
|
|
114
|
-
{categoryY}: {valueX}"
|
|
104
|
+
labelText: "[bold]{name}[/]\n{categoryY}: {valueX}"
|
|
115
105
|
})
|
|
116
106
|
}));
|
|
117
107
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
title: "Clustered Column Chart"
|
|
3
3
|
source: "https://www.amcharts.com/demos/clustered-column-chart/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Clustered Column Chart is the default column chart behavior where values from all series are displayed next to each other at the same category axis value.
|
|
9
9
|
Key implementation details
|
|
10
10
|
In this demo we emphasize the "clusters" by adding margins around them. We do this by setting cellStartLocation and cellEndLocation on the horizontal axis renderer (AxisRendererX). We set them to 0.1 and 0.9 respectively, resulting in 10% margins on both sides.
|
|
11
|
-
|
|
11
|
+
Cell start/end locations
|
|
12
12
|
|
|
13
13
|
## JavaScript
|
|
14
14
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Column and Line Mix"
|
|
3
3
|
source: "https://www.amcharts.com/demos/column-and-line-mix/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You can use our XYChart to mix and match various types of two-dimensional charts - line, bar, column, area, candlestick, OHLC, etc. The most common combination is the column and line chart.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Column Chart with Images on Top"
|
|
3
3
|
source: "https://www.amcharts.com/demos/column-chart-images-top/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Bullets in amCharts 5 are more than just a way to display geometric shapes over the data points. You can display anything inside the bullet - from a simple circle to a fully fledged sub-chart. In this demo we display images as bullet content.
|
|
@@ -77,7 +77,9 @@ var series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
77
77
|
valueYField: "value",
|
|
78
78
|
sequencedInterpolation: true,
|
|
79
79
|
categoryXField: "name",
|
|
80
|
-
tooltip: am5.Tooltip.new(root, { dy: -25, labelText: "{valueY}" })
|
|
80
|
+
tooltip: am5.Tooltip.new(root, { dy: -25, labelText: "{valueY}" }),
|
|
81
|
+
// Each column takes its own color from the series palette
|
|
82
|
+
colorByDataItem: true
|
|
81
83
|
}));
|
|
82
84
|
|
|
83
85
|
|
|
@@ -87,14 +89,6 @@ series.columns.template.setAll({
|
|
|
87
89
|
strokeOpacity: 0
|
|
88
90
|
});
|
|
89
91
|
|
|
90
|
-
series.columns.template.adapters.add("fill", (fill, target) => {
|
|
91
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
series.columns.template.adapters.add("stroke", (stroke, target) => {
|
|
95
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
96
|
-
});
|
|
97
|
-
|
|
98
92
|
// Set data
|
|
99
93
|
var data = [
|
|
100
94
|
{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Column with Rotated Labels"
|
|
3
3
|
source: "https://www.amcharts.com/demos/column-with-rotated-series/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
In this demo, we create a simple column chart.
|
|
@@ -91,19 +91,12 @@ var series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
91
91
|
categoryXField: "country",
|
|
92
92
|
tooltip: am5.Tooltip.new(root, {
|
|
93
93
|
labelText: "{valueY}"
|
|
94
|
-
})
|
|
94
|
+
}),
|
|
95
|
+
// Each column takes its own color from the series palette
|
|
96
|
+
colorByDataItem: true
|
|
95
97
|
}));
|
|
96
98
|
|
|
97
99
|
series.columns.template.setAll({ cornerRadiusTL: 5, cornerRadiusTR: 5, strokeOpacity: 0 });
|
|
98
|
-
series.columns.template.adapters.add("fill", function (fill, target) {
|
|
99
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
series.columns.template.adapters.add("stroke", function (stroke, target) {
|
|
103
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
|
|
107
100
|
// Set data
|
|
108
101
|
var data = [{
|
|
109
102
|
country: "USA",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Columns with Grainy Gradients"
|
|
3
3
|
source: "https://www.amcharts.com/demos/columns-with-grainy-gradients/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Grain pattern is a special kind of pattern that can complement regular fills with overhead pixel noise to add that additional fuzzy look. It works by applying a random assortment of semi-transparent dots over existing fills.
|
|
@@ -88,6 +88,9 @@ var series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
88
88
|
tooltip: am5.Tooltip.new(root, {
|
|
89
89
|
labelText: "{valueY}"
|
|
90
90
|
}),
|
|
91
|
+
// Each column takes its own color, from the palette set above
|
|
92
|
+
colorByDataItem: true,
|
|
93
|
+
colors: chart.get("colors")
|
|
91
94
|
}));
|
|
92
95
|
|
|
93
96
|
series.columns.template.setAll({
|
|
@@ -123,10 +126,6 @@ series.columns.template.states.create("hover", {
|
|
|
123
126
|
cornerRadiusTR: 10
|
|
124
127
|
})
|
|
125
128
|
|
|
126
|
-
series.columns.template.adapters.add("fill", function (fill, target) {
|
|
127
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
128
|
-
});
|
|
129
|
-
|
|
130
129
|
// Set data
|
|
131
130
|
var data = [{
|
|
132
131
|
country: "USA",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Columns with Moving Bullets"
|
|
3
3
|
source: "https://www.amcharts.com/demos/columns-with-moving-bullets/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Interactivity is a great way to direct viewers attention in visualizations. amCharts 5 helps you implement moving bullets in a conservative but effective bar chart to make it way more appealing without sacrificing the maximum comprehension level of this classic chart type.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Curved Columns"
|
|
3
3
|
source: "https://www.amcharts.com/demos/curved-columns/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Curved Column Chart (also known as Curved Bar Chart) is a visual variation of a "standard" bar chart. Semantically there's no difference between regular and curved column chart. The only difference is that columns are displayed in the shape of areas instead of regular rectangles. This gives the chart a fresher visual look while sacrificing clarity a bit, as curves of the columns have no meaning.
|
|
@@ -81,7 +81,9 @@ var series = chart.series.push(
|
|
|
81
81
|
yAxis: yAxis,
|
|
82
82
|
valueYField: "value",
|
|
83
83
|
sequencedInterpolation: true,
|
|
84
|
-
categoryXField: "country"
|
|
84
|
+
categoryXField: "country",
|
|
85
|
+
// Each column takes its own color from the series palette
|
|
86
|
+
colorByDataItem: true
|
|
85
87
|
})
|
|
86
88
|
);
|
|
87
89
|
|
|
@@ -90,14 +92,6 @@ series.columns.template.setAll({
|
|
|
90
92
|
fillOpacity: 0.9,
|
|
91
93
|
strokeOpacity: 0
|
|
92
94
|
});
|
|
93
|
-
series.columns.template.adapters.add("fill", (fill, target) => {
|
|
94
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
series.columns.template.adapters.add("stroke", (stroke, target) => {
|
|
98
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
99
|
-
});
|
|
100
|
-
|
|
101
95
|
series.columns.template.set("draw", function(display, target) {
|
|
102
96
|
var w = target.getPrivate("width", 0);
|
|
103
97
|
var h = target.getPrivate("height", 0);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Divergent Stacked Bars"
|
|
3
3
|
source: "https://www.amcharts.com/demos/divergent-stacked-bars/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Sometimes you want to stack all the bars in a bar chart on top of each other. Other times, you want some parts of the chart go into diverging directions. This demo shows you a simple way to achieve that with amCharts.
|
|
@@ -40,15 +40,6 @@ var chart = root.container.children.push(
|
|
|
40
40
|
// Use only absolute numbers
|
|
41
41
|
root.numberFormatter.set("numberFormat", "#.#s'%");
|
|
42
42
|
|
|
43
|
-
// Add legend
|
|
44
|
-
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
|
|
45
|
-
var legend = chart.children.push(
|
|
46
|
-
am5.Legend.new(root, {
|
|
47
|
-
centerX: am5.p50,
|
|
48
|
-
x: am5.p50
|
|
49
|
-
})
|
|
50
|
-
);
|
|
51
|
-
|
|
52
43
|
// Data
|
|
53
44
|
var data = [{
|
|
54
45
|
category: "Search engines",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Drag and change column value"
|
|
3
3
|
source: "https://www.amcharts.com/demos/drag-and-change-column-value/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
While amCharts libraries primarily focus on data visualization, they can also be used as UI where it makes sense, thanks to all the great interactivity features. In this demo you can adjust the values behind the columns simply by dragging the columns up and down.
|
|
@@ -119,19 +119,12 @@ var series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
119
119
|
valueXField: "date",
|
|
120
120
|
tooltip: am5.Tooltip.new(root, {
|
|
121
121
|
labelText: "{valueY}"
|
|
122
|
-
})
|
|
122
|
+
}),
|
|
123
|
+
// Each column takes its own color from the series palette
|
|
124
|
+
colorByDataItem: true
|
|
123
125
|
}));
|
|
124
126
|
|
|
125
127
|
series.columns.template.setAll({ cornerRadiusTL: 5, cornerRadiusTR: 5, strokeOpacity: 0 });
|
|
126
|
-
series.columns.template.adapters.add("fill", function (fill, target) {
|
|
127
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
series.columns.template.adapters.add("stroke", function (stroke, target) {
|
|
131
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
|
|
135
128
|
// manipulating with mouse code
|
|
136
129
|
var isDown = false;
|
|
137
130
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Drag-ordering of Bars"
|
|
3
3
|
source: "https://www.amcharts.com/demos/drag-ordering-of-bars/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
While data visualization is the primary function of amCharts, you can also use its interactive features to let end-users adjust the charts how they see fit. In this example, viewers can re-arrange the order of bars in the chart.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Dumbbell Plot"
|
|
3
3
|
source: "https://www.amcharts.com/demos/dumbbell-plot/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Dumbbell plot (also known as Dumbbell chart, Connected dot plot) is great for displaying changes between two points in time, two conditions or differences between two groups.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Floating Bar Chart"
|
|
3
3
|
source: "https://www.amcharts.com/demos/floating-bar-chart/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Bars in a bar chart don't have to start at zero. In cases when you need to specify a different starting value in amCharts 5, you set an openValueXField on a ColumnSeries
|
|
@@ -125,8 +125,7 @@ var series = chart.series.push(am5xy.ColumnSeries.new(root, {
|
|
|
125
125
|
series.columns.template.setAll({
|
|
126
126
|
height: am5.percent(100),
|
|
127
127
|
templateField: "columnSettings",
|
|
128
|
-
tooltipText: "[bold]{name}[/]
|
|
129
|
-
{categoryY}: {valueX}"
|
|
128
|
+
tooltipText: "[bold]{name}[/]\n{categoryY}: {valueX}"
|
|
130
129
|
});
|
|
131
130
|
|
|
132
131
|
series.data.setAll(data);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Grouped and Sorted Columns"
|
|
3
3
|
source: "https://www.amcharts.com/demos/grouped-and-sorted-columns/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
amCharts libraries are flexible in a way that even when something is not a special feature in the library, you can still easily implement it with amCharts. In this case we have a 2-level deep dataset but we want to represent it as a column chart you see here - no problem with amCharts 5!
|
|
@@ -89,7 +89,9 @@ var series = chart.series.push(
|
|
|
89
89
|
categoryXField: "category",
|
|
90
90
|
tooltip: am5.Tooltip.new(root, {
|
|
91
91
|
labelText: "{provider} {realName}: {valueY}"
|
|
92
|
-
})
|
|
92
|
+
}),
|
|
93
|
+
// Each column takes its own color from the series palette
|
|
94
|
+
colorByDataItem: true
|
|
93
95
|
})
|
|
94
96
|
);
|
|
95
97
|
|
|
@@ -97,14 +99,6 @@ series.columns.template.setAll({
|
|
|
97
99
|
fillOpacity: 0.9,
|
|
98
100
|
strokeOpacity: 0
|
|
99
101
|
});
|
|
100
|
-
series.columns.template.adapters.add("fill", (fill, target) => {
|
|
101
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
series.columns.template.adapters.add("stroke", (stroke, target) => {
|
|
105
|
-
return chart.get("colors").getIndex(series.columns.indexOf(target));
|
|
106
|
-
});
|
|
107
|
-
|
|
108
102
|
var lineSeries = chart.series.push(
|
|
109
103
|
am5xy.LineSeries.new(root, {
|
|
110
104
|
name: "Series 2",
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
title: "Heat Map with Legend"
|
|
3
3
|
source: "https://www.amcharts.com/demos/heat-map-with-legend/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
Heat map (also known as Heatmap, Heat table, Shading matrix) represents data in a rectangular matrix where individual values are differentiated by color.
|
|
9
|
-
Heat rules
|
|
10
|
-
Heat rules allow modifying element's properties based on its related value in data, like for instance, color of the columns on this charts.
|
|
11
|
-
[More about head rules](https://www.amcharts.com/docs/v5/concepts/settings/heat-rules/)
|
|
12
|
-
Heat legend
|
|
13
|
-
A perfect companion for any color-based heat maps, a head legend can show the spectrum of values and their relation to colors.
|
|
14
|
-
Furthermore, utilizing chart events, it's possible to further enhance UX by showing exact position of hovered element in the whole spectrum.
|
|
8
|
+
Heat map (also known as Heatmap, Heat table, Shading matrix) represents data in a rectangular matrix where individual values are differentiated by color.
|
|
9
|
+
Heat rules
|
|
10
|
+
Heat rules allow modifying element's properties based on its related value in data, like for instance, color of the columns on this charts.
|
|
11
|
+
[More about head rules](https://www.amcharts.com/docs/v5/concepts/settings/heat-rules/)
|
|
12
|
+
Heat legend
|
|
13
|
+
A perfect companion for any color-based heat maps, a head legend can show the spectrum of values and their relation to colors.
|
|
14
|
+
Furthermore, utilizing chart events, it's possible to further enhance UX by showing exact position of hovered element in the whole spectrum.
|
|
15
15
|
[More about head legend](https://www.amcharts.com/docs/v5/concepts/legend/heat-legend/)
|
|
16
16
|
|
|
17
17
|
## JavaScript
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: "Horizontal Dumbbell Plot"
|
|
3
3
|
source: "https://www.amcharts.com/demos/horizontal-dumbbell-plot/"
|
|
4
4
|
category: "column-bar"
|
|
5
|
-
scraped: "2026-
|
|
5
|
+
scraped: "2026-09-29"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
Dumbbell plot (also known as Dumbbell chart, Connected dot plot) is great for displaying changes between two points in time, two conditions or differences between two groups.
|