@amcharts/amcharts5-mcp 1.3.2 → 1.4.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 CHANGED
@@ -105,7 +105,16 @@ root.dateFormatter.setAll({ dateFormat: "yyyy-MM-dd" });
105
105
  root.numberFormatter.setAll({ numberFormat: "#,###.##" });
106
106
  ```
107
107
 
108
- **Available themes:** `Animated`, `Dark`, `Frozen`, `Dataviz`, `Material`, `Moonrise`, `Spirited`, `Kelly`, `Micro`, `Responsive`.
108
+ **Available themes** (as of 5.20.0):
109
+
110
+ | Kind | Themes |
111
+ |------|--------|
112
+ | Behavioral | `Animated` (animations), `Micro` (stripped-down micro charts), `Responsive` (size-based rules) |
113
+ | Light palettes | `Dataviz`, `Frozen`, `Kelly`, `Material`, `Moonrise`, `Spirited`, `Ember`, `Nord`, `Pastel`, `Petroleum`, `Savanna`, `Colorblind` (Okabe-Ito, color-blindness safe), `Patterns` (pattern fills instead of flat colors) |
114
+ | Dark | `Dark`, `Midnight`, plus a dark variant of most palettes: `DatavizDark`, `FrozenDark`, `KellyDark`, `MaterialDark`, `MoonriseDark`, `SpiritedDark`, `NordDark`, `PastelDark`, `ColorblindDark`, `PatternsDark` |
115
+ | Parameterized (5.20.0) | `Monochrome`, `Adaptive` — see below |
116
+
117
+ Palette themes are additive: combine with `Animated`, e.g. `root.setThemes([am5themes_Animated.new(root), am5themes_Nord.new(root)])`. The `*Dark` variants already carry dark interface colors, so do NOT also add `Dark`.
109
118
 
110
119
  ## Colors
111
120
 
@@ -458,6 +467,39 @@ series.columns.template.states.create("active", {
458
467
  // State animation: stateAnimationDuration, stateAnimationEasing
459
468
  ```
460
469
 
470
+ ## Parameterized themes — Monochrome & Adaptive (5.20.0)
471
+
472
+ Two themes generate their palette from colors you pass in (OKLCH-based, so the result stays perceptually balanced). Because a theme cannot take constructor parameters, these ship as **factory functions** — call them with `(root, settings)`; `.new(root, settings)` also works.
473
+
474
+ ```js
475
+ import am5themes_Monochrome from "@amcharts/amcharts5/themes/Monochrome";
476
+ import am5themes_Adaptive from "@amcharts/amcharts5/themes/Adaptive";
477
+
478
+ // Monochrome — single-hue lightness ramp
479
+ root.setThemes([
480
+ am5themes_Animated.new(root),
481
+ am5themes_Monochrome(root, {
482
+ color: 0x2c6e91, // base hue (default: blue #2e7c9e)
483
+ accent: 0xff7f0e, // optional — applied to the FIRST series only, so it pops
484
+ count: 7, // steps in the ramp (default 7)
485
+ dark: false // true = dark background + light-to-mid ramp
486
+ })
487
+ ]);
488
+
489
+ // Adaptive — full palette generated from one or two base colors
490
+ root.setThemes([
491
+ am5themes_Animated.new(root),
492
+ am5themes_Adaptive(root, {
493
+ baseColor: 0x2c6e91, // first generated color IS this color (good for brand colors)
494
+ baseColor2: 0xffdd00, // optional — palette spans the two colors
495
+ count: 10, // number of series colors (default 10)
496
+ dark: false
497
+ })
498
+ ]);
499
+ ```
500
+
501
+ Both are additive (they do not modify built-in themes) and both handle dark mode themselves via `dark: true` — do not also add the `Dark` theme.
502
+
461
503
  ## Custom themes
462
504
 
463
505
  ```js
@@ -660,7 +702,7 @@ onUnmounted(() => { root.dispose(); });
660
702
  12. **CDN script load order** — `index.js` must load first, then `xy.js`, then any package that depends on it (`radar.js`, `timeline.js`, `gantt.js`). Wrong order causes runtime errors. Correct order: `index.js` → `xy.js` → `radar.js` / `timeline.js` / `gantt.js` → `themes/*.js`.
661
703
  13. **No `minorGrid` / `minorTicks` / `minorLabels` objects** — These do not exist on axes. Minor grid is enabled via boolean flags on the **renderer**: `minorGridEnabled: true` and optionally `minorLabelsEnabled: true`. Styling is done through theme rules targeting the `"minor"` tag, not through separate object properties.
662
704
  14. **Flow chart animated bullets go on `series.bullets`, NOT `series.links.template.bullets`** — To animate labels/circles flowing along Sankey or Chord links, use `series.bullets.push(function(...) { ... })`. Animate `bullet.locationX` (Sankey) or `bullet.locationY` (Chord) from 0→1 with `loops: Infinity`. Use an adapter on opacity for fade effect. See `references/flow.md` → "Animated bullets along links".
663
- 15. **`MapPointSeries` needs `latitudeField`/`longitudeField` when using `data.setAll()`** — If point data has `latitude`/`longitude` fields, the series must declare them: `am5map.MapPointSeries.new(root, { latitudeField: "latitude", longitudeField: "longitude" })`. Without these, points silently won't appear. This is NOT needed when using `pushDataItem({ latitude: ..., longitude: ... })` which passes coordinates directly.
705
+ 15. **`MapPointSeries` needs `latitudeField`/`longitudeField` when your data fields are named anything other than `latitude`/`longitude`** — Since 5.16.1 the series defaults to `latitudeField: "latitude"`, `longitudeField: "longitude"`, so data using exactly those names works with no declaration. Any other naming (`lat`/`lng`, `y`/`x`, …) must be declared or the points silently won't appear: `am5map.MapPointSeries.new(root, { latitudeField: "lat", longitudeField: "lng" })`. Neither is needed with `pushDataItem({ latitude: ..., longitude: ... })`, which passes coordinates directly. On amCharts **older than 5.16.1** there were no defaults, so declare the fields explicitly if you must support those versions.
664
706
  16. **`data.setAll()` does NOT animate — use `data.setIndex()` for animated updates** — When the user asks to update/refresh data with animation, do NOT use `series.data.setAll(newData)` — it replaces everything instantly with no transition. Instead, update each item with `series.data.setIndex(i, newItem)` which triggers smooth value animation. For full replacement with animation, loop: `newData.forEach(function(item, i) { series.data.setIndex(i, item); })`.
665
707
  17. **`color.lighten()` / `color.darken()` are NOT instance methods** — `am5.color(0xff0000).lighten(0.3)` does NOT work. Use static methods: `am5.Color.lighten(color, 0.3)` to lighten, `am5.Color.lighten(color, -0.3)` to darken. There is NO `darken()` method — use negative lighten. Also available: `am5.Color.brighten()`, `am5.Color.saturate()`.
666
708
  18. **Venn diagram has no `VennDiagram` class** — `am5venn.Venn` is pushed directly into a `Container`, NOT into a chart's `series`. See `references/venn.md`.
@@ -716,7 +758,7 @@ Skip this step entirely if you cannot execute code (e.g., chat-only context with
716
758
 
717
759
  ## Recent API changes (newer than the bundled class reference)
718
760
 
719
- The bundled per-class API reference was snapshotted on **2026-03-15**, so it predates the changes below. Prefer these names/settings; for anything newer, verify against the live docs (see next section).
761
+ The bundled per-class API reference was snapshotted on **2026-03-15**, so it predates the changes below. Latest release covered here: **5.20.1** (2026-08-03). Prefer these names/settings; for anything newer, verify against the live docs (see next section).
720
762
 
721
763
  **Renamed settings (old name still works but is deprecated — use the new one):**
722
764
 
@@ -731,14 +773,50 @@ am5stock.MovingAverage.new(root, { maType: "exponential", period: 20 });
731
773
  am5hierarchy.VoronoiTreemap.new(root, { shapeType: "rectangle" }); // was: type
732
774
  ```
733
775
 
776
+ **Breaking change — WordCloud internals (5.20.1):** the layout is now computed synchronously in one pass (much faster). The per-data-item `ghostLabel` is gone and labels live in an internal container, so `dataItem.get("ghostLabel")` and any code walking `series.children` to find labels must be updated — use `series.labels` / `dataItem.get("label")` instead.
777
+
734
778
  **New settings / methods worth knowing:**
779
+
780
+ *Themes & styling*
781
+ - 20+ new themes (5.20.0): `Midnight`, `Ember`, `Nord`, `Pastel`, `Colorblind`, `Patterns`, `Petroleum`, `Savanna`, plus `*Dark` variants of most palettes. Two parameterized factory themes, `Monochrome` and `Adaptive` — see "Parameterized themes" above.
782
+ - New fill patterns (5.20.0): `am5.StarPattern` (`radius`, `innerRadius`, `spikes`, `gap`, `checkered`) and `am5.TrianglePattern` (`maxWidth`, `maxHeight`, `gap`, `checkered`).
783
+ - `rotateShapes` (5.20.0) on `RectanglePattern`/`StarPattern`/`TrianglePattern`: `rotation` then spins each shape around its own center instead of the whole grid — tiles seamlessly and is much faster. Prefer it over a whole-pattern `rotation` on large tiles.
784
+ - `Series`: `fillGradient` / `strokeGradient` settings. A bullet `Graphics` with no paint of its own (`fill`, `fillGradient`, `fillPattern`, `stroke`, `strokeGradient`) now inherits all of them from its series — and on pie, funnel, flow and hierarchy charts, from its own slice/node (5.20.0–5.20.1).
785
+
786
+ *XY charts*
787
+ - `XYChart`: `strokeWidths` (array of pixel widths) and `strokeDasharrays` (array of dash arrays) — cycled across line series as they are added, exactly like `colors`. Lets series be told apart without relying on color, e.g. with the `Patterns` theme.
788
+ - `XYCursor`: `clickTolerance` (default `0`) — how many pixels outside the plot area a press may start and still begin a zoom/selection. The selection itself still starts at the plot edge.
789
+ - `XYSeries`: a value field (`valueYField`, `openValueYField`, …) can now be changed after creation — re-set the series data afterwards for it to take effect. A series can also be reassigned to a different `xAxis`/`yAxis` after creation.
790
+
791
+ *WordCloud (5.20.1)*
792
+ - `svgPath` arranges words into a shape (experimental), with `maskByShape` to clip them to the outline and `shapeTolerance` to control spill (negative = padding inside). See `references/wordcloud.md`.
793
+ - `randomizeAngles: false` cycles `angles` in order for a reproducible layout; `allowNesting: false` packs words as non-overlapping bounding boxes (use it when labels have opaque backgrounds).
794
+ - `angles` now accepts **any** angle (e.g. `[0, -30, -45]`). Before 5.20.1 only `0`/`±90` were handled, and the old docs said so explicitly — that restriction is gone.
795
+
796
+ *Core / events*
797
+ - New `globalpointerdown` event on all elements — fires on a press anywhere on the chart surface, mirroring `globalpointermove`/`globalpointerup`.
798
+ - `Root`: `sanitizeHTML` (5.19.0, default `true`) — dynamically-set HTML (`html`/`labelHTML`, HTML tooltips, modal content) is sanitized; set `false` to opt out. Exports gained `escapeFormulas` (default `true`) to guard CSV/XLSX against formula injection.
799
+ - `Root`: `ariaLabel` is now applied to the `<div>` holding the chart's focusable elements (5.20.0).
800
+ - `Label`: `oversizedBehavior: "truncate"` now ignores `maxHeight` (there is no way to truncate text vertically).
801
+ - A `Container`'s `Rectangle`/`RoundedRectangle` background now defaults `crisp` to `true` unless set explicitly (5.20.0).
802
+
803
+ *Maps*
804
+ - `MapChart`: `projectionName` (5.19.0) — string alternative to `projection`, e.g. `"geoOrthographic"`, mainly for JSON config. Register extra ones with `am5map.registerProjection()`. Bundled projections are no longer eagerly imported, so unused ones tree-shake away.
805
+ - `MapSankeySeries` (5.17.0) — Sankey overlaid on a map; auto-resolves `sourceId`/`targetId` once `polygonSeries` geoJSON loads (5.17.1), so no `datavalidated` wrapper needed. See `references/map.md`.
806
+ - `MapPointSeries` defaults changed to `longitudeField: "longitude"`, `latitudeField: "latitude"` (5.16.1).
807
+
808
+ *Hierarchy & axes*
735
809
  - `Tree`: `fitNodes` (5.18.0, exclude hidden nodes from layout), `nodeSeparation` (5.16.2, custom node-spacing fn), `clustered` (5.16.2, dendrogram layout — leaves at same depth).
736
810
  - `ValueAxis`: `syncZeros` (5.16.2, align zero across synced axes — needs `syncWithAxis`).
737
811
  - `Hierarchy`: `parentIdField` setting + `setFlatData(data)` method (5.16.2) — feed flat `{id, parentId}` data instead of nested `children`.
738
- - All entities: `onDebounced(key, cb, delay)` / `offDebounced(key, cb?)` and `onPrivateDebounced` / `offDebouncedPrivate` (5.17.3) — fire once after rapid changes settle.
812
+
813
+ *Stock*
814
+ - Indicator numeric settings now enforce min/max limits, so extreme values can no longer freeze the page. `IIndicatorEditableSetting` gained `scale`, `maxValue` and `step` (5.20.0).
815
+ - Volume Profile now spreads each bar's volume across its full high/low range instead of placing it all at the close. Several indicator math fixes (Williams %R, Momentum, RSI, Moving Average Cross defaults, Commodity Channel Index) landed in 5.19.0–5.20.0 — see `references/stock.md`.
816
+
817
+ *All entities*
818
+ - `onDebounced(key, cb, delay)` / `offDebounced(key, cb?)` and `onPrivateDebounced` / `offDebouncedPrivate` (5.17.3) — fire once after rapid changes settle.
739
819
  - `Label`: `fontFamily: "inherit"` (5.17.3) uses the chart container's computed font.
740
- - `MapSankeySeries` (5.17.0) — Sankey overlaid on a map; auto-resolves `sourceId`/`targetId` once `polygonSeries` geoJSON loads (5.17.1), so no `datavalidated` wrapper needed. See `references/map.md`.
741
- - `MapPointSeries` defaults changed to `longitudeField: "longitude"`, `latitudeField: "latitude"` (5.16.1).
742
820
 
743
821
  ## Verify unfamiliar API before using it
744
822
 
package/content/map.md CHANGED
@@ -166,7 +166,9 @@ pointSeries.bullets.push(function() {
166
166
  });
167
167
  });
168
168
 
169
- // Add points via data — requires latitudeField/longitudeField on the series
169
+ // Add points via data. Fields named "latitude"/"longitude" are the series
170
+ // defaults since 5.16.1; any other naming must be declared via
171
+ // latitudeField/longitudeField or the points silently won't render.
170
172
  pointSeries.data.setAll([
171
173
  { latitude: 48.8566, longitude: 2.3522, name: "Paris" },
172
174
  { latitude: 40.7128, longitude: -74.0060, name: "New York" },
package/content/stock.md CHANGED
@@ -185,7 +185,10 @@ stockChart.indicators.push(am5stock.MovingAverage.new(root, {
185
185
  stockSeries: valueSeries,
186
186
  legend: legend,
187
187
  period: 20,
188
- type: "simple" // "simple", "weighted", "exponential", "dema", "tema"
188
+ maType: "simple" // "simple", "weighted", "exponential", "dema", "tema"
189
+ // NOTE: `type` was renamed to `maType` in 5.18.0 — `type` still
190
+ // works but is deprecated. Same for MovingAverageDeviation,
191
+ // MovingAverageEnvelope and BollingerBands.
189
192
  }));
190
193
 
191
194
  // RSI (creates its own panel)
@@ -244,6 +247,43 @@ stockChart.indicators.push(am5stock.Volume.new(root, {
244
247
 
245
248
  All classes are under `am5stock.*` (e.g., `am5stock.BollingerBands`).
246
249
 
250
+ ### Indicator changes in 5.19.0–5.20.0
251
+
252
+ Several indicators changed behavior. If you have hardcoded expectations or saved settings, re-check them:
253
+
254
+ | Indicator | Change | Version |
255
+ |-----------|--------|---------|
256
+ | `VolumeProfile` | Each bar's volume is now distributed across the full high/low range it traded, instead of being placed entirely at the closing price. Also no longer errors in `ticks` count mode when the visible price range is flat. | 5.20.0 |
257
+ | `MACross` | Default fast/slow periods were inverted; defaults are now `fastPeriod: 9`, `period: 21`. | 5.20.0 |
258
+ | `WilliamsR` | Used a `period + 1` lookback and treated a missing high/low as `0`; now uses exactly `period` bars. | 5.20.0 |
259
+ | `Momentum` | Skipped its first computable value; now plots from `period` bars onward. | 5.20.0 |
260
+ | `RelativeStrengthIndex` | Returned `0` (max "oversold") for a perfectly flat market; now returns a neutral `50`. | 5.20.0 |
261
+ | `AccelerationBands` | `factor` now displays as the conventional `1` instead of `0.001` in both the settings modal and the legend; upper/lower bands were swapped so `upperColor`/`lowerColor` apply correctly. | 5.20.0–5.20.1 |
262
+ | `CommodityChannelIndex` | Typical price was computed as `(high + low + close) / 2` instead of `/ 3`, inflating values. | 5.19.0 |
263
+
264
+ All indicators now enforce min/max limits on their numeric settings, so extreme values entered in the settings modal can no longer freeze the page (e.g. a Volume Profile row count of 24,000).
265
+
266
+ ### Custom indicator editable settings (5.20.0)
267
+
268
+ `IIndicatorEditableSetting` gained three properties for the settings modal:
269
+
270
+ ```js
271
+ _editableSettings: [{
272
+ key: "period",
273
+ name: "Period",
274
+ type: "number",
275
+ minValue: 1,
276
+ maxValue: 200, // 5.20.0 — upper bound enforced by the input
277
+ step: 1 // 5.20.0 — step; a step of 1 also marks the value as an integer
278
+ }, {
279
+ key: "factor",
280
+ name: "Factor",
281
+ type: "number",
282
+ scale: 1000 // 5.20.0 — display multiplier for the modal ONLY:
283
+ // shown value = stored × scale, divided back on save
284
+ }]
285
+ ```
286
+
247
287
  ## Data format
248
288
 
249
289
  ```js
@@ -57,15 +57,27 @@ series.appear(1000);
57
57
  |---------|------|---------|-------------|
58
58
  | `categoryField` | string | — | Data field for word text (required) |
59
59
  | `valueField` | string | — | Data field for word weight/size (required) |
60
- | `maxFontSize` | number \| Percent | `100` | Maximum font size (a `Percent` is relative to the smaller chart dimension) |
61
- | `minFontSize` | number \| Percent | `10` | Minimum font size (a `Percent` is relative to the smaller chart dimension) |
62
- | `angles` | number[] | `[0]` | Allowed rotation angles for words |
60
+ | `maxFontSize` | number \| Percent | `am5.percent(15)` | Maximum font size (a `Percent` is relative to the smaller chart dimension) |
61
+ | `minFontSize` | number \| Percent | `am5.percent(2)` | Minimum font size (a `Percent` is relative to the smaller chart dimension) |
62
+ | `angles` | number[] | `[0, -90]` | Allowed rotation angles for words. **Any angle works** as of 5.20.1 (e.g. `[0, -30, -45]`), not just `0`/`±90` as in earlier versions |
63
+ | `randomizeAngles` | boolean | `true` | `true` = each word picks a random angle from `angles`. `false` = words cycle through `angles` in order (word 0 → `angles[0]`, …) which, with `randomness: 0`, makes the layout reproducible. *(5.20.1)* |
63
64
  | `randomness` | number (0–1) | `0` | Layout randomness (0 = ordered by value, 1 = fully random) |
65
+ | `allowNesting` | boolean | `true` | `true` = small words tuck into the concavities of bigger ones (tight packing, bounding boxes may overlap). `false` = whole bounding boxes are packed so they never overlap — use this when labels have an opaque `background`. *(5.20.1)* |
64
66
  | `minWordLength` | number | `1` | Skip words shorter than this |
67
+ | `minValue` | number | — | Skip words occurring fewer times than this |
65
68
  | `maxCount` | number | — | Maximum number of words to display |
66
69
  | `excludeWords` | string[] | `[]` | Words to exclude |
67
70
  | `text` | string | — | Raw text to parse — words are extracted and weighted by frequency automatically |
68
71
  | `colors` | ColorSet | — | Color set for words |
72
+ | `fillField` | string | — | Data field holding a per-word label fill color |
73
+ | `autoFit` | boolean | `true` | Scale font sizes down so all words fit the available area |
74
+ | `step` | number | `15` | Step size used when searching for the next word placement |
75
+ | `svgPath` | string | — | Arrange words to fill this SVG path shape (experimental) *(5.20.1)* |
76
+ | `maskByShape` | boolean | `false` | Clip words to the `svgPath` outline for a crisp silhouette. Requires `svgPath`. *(5.20.1)* |
77
+ | `shapeTolerance` | number | `0` | Extra pixels a word may spill past the `svgPath` outline; negative pulls words inside, creating padding. Requires `svgPath`. *(5.20.1)* |
78
+ | `animationDuration` | number | — | Duration of word animation on chart resize |
79
+ | `sequencedInterpolation` | boolean | `true` | Stagger the word reveal instead of showing all at once |
80
+ | `sequencedDelay` | number | `15` | Milliseconds between words when `sequencedInterpolation` is on |
69
81
 
70
82
  ### excludeWords example
71
83
 
@@ -77,7 +89,81 @@ am5wc.WordCloud.new(root, {
77
89
  });
78
90
  ```
79
91
 
80
- **Note:** amCharts WordCloud does not support mask/shape rendering (words constrained to a custom shape). Words are arranged in a rectangular area.
92
+ ## Shaped word clouds — `svgPath` (5.20.1)
93
+
94
+ Words can be arranged to fill an arbitrary shape. The path is scaled proportionally to fit the plot area.
95
+
96
+ ```js
97
+ var series = root.container.children.push(
98
+ am5wc.WordCloud.new(root, {
99
+ categoryField: "tag",
100
+ valueField: "weight",
101
+ svgPath: "M10,30 A20,20 0,0,1 50,30 A20,20 0,0,1 90,30 Q90,60 50,90 Q10,60 10,30 z", // heart
102
+ maskByShape: true, // clip letters that overhang the outline
103
+ shapeTolerance: -4, // negative = padding inside the shape
104
+ angles: [0], // simple shapes fill better with fewer angles
105
+ minFontSize: am5.percent(2),
106
+ maxFontSize: am5.percent(12)
107
+ })
108
+ );
109
+ ```
110
+
111
+ The shape outline itself is drawn behind the words as `series.shape` (a `Graphics`), by default a faint 10%-opacity silhouette. Style or hide it:
112
+
113
+ ```js
114
+ series.shape.setAll({ fill: am5.color(0xff3366), fillOpacity: 0.08 });
115
+ series.shape.set("fillOpacity", 0); // no visible silhouette, words only
116
+ ```
117
+
118
+ Style `fill`/`stroke` only — the series manages the shape's geometry (`svgPath`, `scale`, `x`, `y`) and its `forceHidden` flag, so setting those is pointless. To hide the silhouette use `fillOpacity: 0`.
119
+
120
+ **Caveats:** this is an experimental feature and the fit is approximate. Favor simple, bold shapes over thin or highly concave ones, and tune `shapeTolerance`, `maskByShape`, `angles`, `minFontSize`/`maxFontSize` per shape. `shapeTolerance` affects placement only — the drawn outline never moves.
121
+
122
+ ## Diagonal angles (5.20.1)
123
+
124
+ Before 5.20.1 only `0`, `90` and `-90` were handled. The layout rewrite rasterizes each word and its collision mask at the word's actual angle, so arbitrary angles now work — and neighbors pack into the corners of a rotated word's footprint instead of reserving its full axis-aligned bounding box.
125
+
126
+ ```js
127
+ am5wc.WordCloud.new(root, {
128
+ categoryField: "tag",
129
+ valueField: "weight",
130
+ angles: [0, -30, -45, -60, -90]
131
+ });
132
+ ```
133
+
134
+ One caveat: if a word comes out very wide relative to the available area, the layout flips it to `0` or `±90` for a better fit — but only when that value is present in your `angles` array. Leave them out and your angles are used as given.
135
+
136
+ ## Reproducible layouts
137
+
138
+ By default word placement is randomized, so the cloud looks different on every render. For a stable layout:
139
+
140
+ ```js
141
+ am5wc.WordCloud.new(root, {
142
+ categoryField: "tag",
143
+ valueField: "weight",
144
+ randomness: 0, // order strictly by value
145
+ randomizeAngles: false // cycle `angles` in order instead of picking randomly
146
+ });
147
+ ```
148
+
149
+ ## Labels with opaque backgrounds
150
+
151
+ Nesting lets small words sit inside the gaps of larger ones, which looks wrong once labels have a solid background — the background rectangles slide over neighbors. Turn nesting off so whole bounding boxes are packed:
152
+
153
+ ```js
154
+ series.set("allowNesting", false);
155
+ series.labels.template.setAll({
156
+ background: am5.RoundedRectangle.new(root, { fill: am5.color(0x1f2933), fillOpacity: 1 })
157
+ });
158
+ ```
159
+
160
+ ## Breaking change in 5.20.1
161
+
162
+ The layout is now computed synchronously in a single pass instead of one word per animation frame — much faster for large clouds. Consequences for existing code:
163
+
164
+ - The per-data-item `ghostLabel` no longer exists — `dataItem.get("ghostLabel")` returns `undefined`.
165
+ - Labels are held in an internal container, so code walking `series.children` to find labels breaks. Use `series.labels` (the `ListTemplate`) or `dataItem.get("label")`.
166
+ - The reveal is staggered via `sequencedInterpolation`/`sequencedDelay` (defaults `true` / `15`ms) rather than by the layout itself.
81
167
 
82
168
  ## Customizing labels
83
169
 
package/content/xy.md CHANGED
@@ -382,6 +382,17 @@ chart.set("cursor", am5xy.XYCursor.new(root, { snapToSeries: [series] }));
382
382
 
383
383
  **Do NOT** pass `lineX`/`lineY` as constructor options to `XYCursor.new()`. Always access `cursor.lineX` / `cursor.lineY` after creation.
384
384
 
385
+ **Easier edge selections (`clickTolerance`, 5.20.0)** — by default a zoom/select drag can only begin inside the plot area, which makes selecting right up to an edge fiddly. `clickTolerance` widens the area where a press may *start*:
386
+
387
+ ```js
388
+ chart.set("cursor", am5xy.XYCursor.new(root, {
389
+ behavior: "selectX",
390
+ clickTolerance: 20 // px outside the plot area where a drag may start (default 0)
391
+ }));
392
+ ```
393
+
394
+ The selection itself still starts at the plot edge — the press point is clamped into the plot area.
395
+
385
396
  For timeline charts, use `am5timeline.CurveCursor` instead — see `references/timeline.md`.
386
397
 
387
398
  ## Scrollbar
@@ -675,6 +686,45 @@ am5xy.XYChart.new(root, {
675
686
  })
676
687
  ```
677
688
 
689
+ ## Distinguishing line series without color (5.20.0)
690
+
691
+ `XYChart` can cycle stroke widths and dash patterns across line series as they are added, exactly the way `colors` cycles series colors. Useful for print, for color-blind-safe output, or with the `Patterns` theme.
692
+
693
+ ```js
694
+ const chart = root.container.children.push(am5xy.XYChart.new(root, {
695
+ strokeWidths: [3, 2, 2], // px, cycled per line series
696
+ strokeDasharrays: [0, [6, 3], [2, 2]] // 0 or [] = solid line
697
+ }));
698
+ ```
699
+
700
+ Each added line series takes the next entry by position, wrapping around when the array runs out.
701
+
702
+ ## Series gradients (5.20.0)
703
+
704
+ `Series` accepts `fillGradient` and `strokeGradient`:
705
+
706
+ ```js
707
+ series.set("fillGradient", am5.LinearGradient.new(root, {
708
+ stops: [{ opacity: 0.6 }, { opacity: 0 }],
709
+ rotation: 90
710
+ }));
711
+ ```
712
+
713
+ A bullet `Graphics` that sets none of `fill`, `fillGradient`, `fillPattern`, `stroke`, `strokeGradient` now inherits all of them from its series, so bullets pick up series gradients and patterns automatically.
714
+
715
+ ## Changing fields and axes after creation (5.20.0)
716
+
717
+ ```js
718
+ // Swap which data field a series plots — then re-set the data
719
+ series.set("valueYField", "profit");
720
+ series.data.setAll(data);
721
+
722
+ // Move a series to a different axis
723
+ series.set("yAxis", secondaryYAxis);
724
+ ```
725
+
726
+ Both were previously fixed at creation time. Re-setting the series data is required for a value-field change to take effect.
727
+
678
728
  ---
679
729
 
680
730
  # amCharts 5 XY Charts — Working Examples
@@ -2,6 +2,8 @@
2
2
  title: "Word cloud"
3
3
  source: "https://www.amcharts.com/docs/v5/charts/word-cloud/"
4
4
  scraped: "2026-03-15"
5
+ updated: "2026-08-05"
6
+ updatedFor: "@amcharts/amcharts5@5.20.1"
5
7
  ---
6
8
 
7
9
  [Word clouds](https://en.wikipedia.org/wiki/Tag_cloud) (or tag clouds) help visualize weight or importance of individual words from a keyword list or a free-form text.
@@ -247,13 +249,27 @@ Series setting responsible for identifying possible angles is named `angles`.
247
249
 
248
250
  It's an array of numbers, and the default is `[0, -90]` meaning that words can come at zero (horizontal) or 90 (vertical) angle.
249
251
 
250
- The only supported values are `0`, `90`, and `-90`.
251
-
252
252
  To make all words horizontal, set it to `[0]`. To make all vertical, use `[90]`.
253
253
 
254
+ **Any angle is supported as of 5.20.1.** Earlier versions only handled `0`, `90` and `-90`; the layout rewrite in 5.20.1 rasterizes each word and its collision mask at the word's actual angle, so diagonal values work and neighboring words pack into the corners of a rotated word's footprint rather than reserving its full axis-aligned bounding box.
255
+
256
+ ```javascript
257
+ am5wc.WordCloud.new(root, {
258
+ categoryField: "tag",
259
+ valueField: "weight",
260
+ angles: [0, -30, -45, -60, -90] // arbitrary angles, not just 0/±90
261
+ });
262
+ ```
263
+
264
+ NOTE There is one place where `0` and `±90` still get special treatment: if a word comes out very wide relative to the available area, the layout will flip it to `0` or `±90` for a better fit — but only if that value is present in your `angles` array. Omit them and your angles are used as given.
265
+
266
+ #### Choosing angles
267
+
268
+ `randomizeAngles` (default `true`) picks a random entry from `angles` for each word. Set it to `false` to cycle through `angles` in order — combined with `randomness: 0` this produces a reproducible layout.
269
+
254
270
  #### Rotating whole series
255
271
 
256
- Even though non-horizontal/vertical angles are not supported, the whole series can easily be rotated to achieve intermediate angle effect by `rotation` and relative centering settings to the series itself.
272
+ Instead of (or in addition to) rotating individual words, the whole series can be rotated using `rotation` and relative centering settings on the series itself.
257
273
 
258
274
  let series = root.container.children.push(
259
275
  am5wc.WordCloud.new(root, {
@@ -2,6 +2,8 @@
2
2
  title: "Patterns"
3
3
  source: "https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/"
4
4
  scraped: "2026-03-15"
5
+ updated: "2026-08-05"
6
+ updatedFor: "@amcharts/amcharts5@5.20.1"
5
7
  ---
6
8
 
7
9
  This tutorial looks at how we can create patterns to use for element fills ant outlines.
@@ -43,8 +45,57 @@ Example
43
45
 
44
46
  `[PathPattern](https://www.amcharts.com/docs/v5/reference/pathpattern/)`
45
47
 
48
+ `[StarPattern](https://www.amcharts.com/docs/v5/reference/starpattern/)` (5.20.0)
49
+
50
+ `[TrianglePattern](https://www.amcharts.com/docs/v5/reference/trianglepattern/)` (5.20.0)
51
+
46
52
  Patterns can be customized by applying rotation, gap, stroke, and other settings, which we'll explore in a bit.
47
53
 
54
+ ### Star and triangle patterns (5.20.0)
55
+
56
+ `StarPattern` and `TrianglePattern` work like `RectanglePattern`/`CirclePattern` — a grid of shapes with a `gap` between them, and an optional `checkered` mode that places only every second shape.
57
+
58
+ ```javascript
59
+ columnSeries.columns.template.set("fillPattern", am5.StarPattern.new(root, {
60
+ color: am5.color(0xffffff),
61
+ radius: 5, // outer radius of the star, in pixels. Default: 5
62
+ innerRadius: am5.percent(50), // inner radius: pixels or a percent of `radius`. Default: 50%
63
+ spikes: 5, // number of spikes. Default: 5
64
+ gap: 6, // gap between stars, in pixels. Default: 6
65
+ checkered: false, // place every second star. Default: false
66
+ centered: true // center stars in their grid cell. Default: true
67
+ }));
68
+
69
+ columnSeries.columns.template.set("fillPattern", am5.TrianglePattern.new(root, {
70
+ color: am5.color(0xffffff),
71
+ maxWidth: 8, // width of the triangle, in pixels. Default: 8
72
+ maxHeight: 8, // height of the triangle, in pixels. Default: 8
73
+ gap: 6, // gap between triangles, in pixels. Default: 6
74
+ checkered: false,
75
+ centered: true
76
+ }));
77
+ ```
78
+
79
+ ### `rotateShapes` (5.20.0)
80
+
81
+ `RectanglePattern`, `StarPattern` and `TrianglePattern` accept a `rotateShapes` setting (default `false`).
82
+
83
+ When `false`, `rotation` rotates the whole pattern grid. That does not tile periodically on an axis-aligned tile, so you usually have to enlarge `width`/`height` and tweak `gap` to avoid seams — expensive on large tiles.
84
+
85
+ When `true`, `rotation` instead rotates **each shape around its own center** while the grid stays axis-aligned. This tiles seamlessly (a small `width`/`height` is enough) and is significantly faster.
86
+
87
+ ```javascript
88
+ columnSeries.columns.template.set("fillPattern", am5.RectanglePattern.new(root, {
89
+ color: am5.color(0xffffff),
90
+ rotation: 45,
91
+ rotateShapes: true // rotate each rectangle, not the whole grid
92
+ }));
93
+ ```
94
+
95
+ NOTE Star, triangle, rectangle and circle patterns normalize an oversized `width`/`height` down to a single repeat cell (2×2 cells when `checkered`), since the grid repeats every cell anyway. This optimization is skipped when a whole-pattern `rotation` is set — another reason to prefer `rotateShapes`.
96
+
97
+ NOTE As of 5.20.0, `PathPattern` repeats its `svgPath` as a grid itself instead of drawing once and letting the rendering engine repeat it.
98
+
48
99
  ## Setting pattern
49
100
 
50
101
  To set a pattern fill on an element, we need to assign it to element's `fillPattern` setting.
@@ -243,6 +294,8 @@ For more configuration options, visit following class references:
243
294
  - [`RectanglePattern` settings](https://www.amcharts.com/docs/v5/reference/linepattern/#Settings)
244
295
  - [`CirclePattern` settings](https://www.amcharts.com/docs/v5/reference/linepattern/#Settings)
245
296
  - [`PathPattern` settings](https://www.amcharts.com/docs/v5/reference/pathpattern/#Settings)
297
+ - [`StarPattern` settings](https://www.amcharts.com/docs/v5/reference/starpattern/#Settings)
298
+ - [`TrianglePattern` settings](https://www.amcharts.com/docs/v5/reference/trianglepattern/#Settings)
246
299
 
247
300
  ## Examples
248
301
 
@@ -2,6 +2,8 @@
2
2
  title: "Events"
3
3
  source: "https://www.amcharts.com/docs/v5/concepts/events/"
4
4
  scraped: "2026-03-15"
5
+ updated: "2026-08-05"
6
+ updatedFor: "@amcharts/amcharts5@5.20.1"
5
7
  ---
6
8
 
7
9
  ## User interactions
@@ -82,6 +84,22 @@ For example, a Scrollbar might invoke a `rangechanged` event when its selection
82
84
 
83
85
  For a complete list of element's events, see "Events" section in its class reference. Here's a [link](https://www.amcharts.com/docs/v5/reference/scrollbar/#Events) to `Scrollbar` events as an example.
84
86
 
87
+ ## Global pointer events
88
+
89
+ Regular pointer events like `pointerdown` fire only when the pointer is over the element itself. The "global" variants fire on **every** element for a pointer action anywhere on the chart surface, which is what you need for drag-style interactions that must keep tracking once the pointer leaves the element.
90
+
91
+ Available on all elements:
92
+
93
+ - `globalpointermove`
94
+ - `globalpointerup`
95
+ - `globalpointerdown` — added in 5.20.0
96
+
97
+ ```javascript
98
+ series.columns.template.events.on("globalpointerdown", function(ev) {
99
+ // fires on a press anywhere on the chart surface
100
+ });
101
+ ```
102
+
85
103
  ## Debounced events
86
104
 
87
105
  Starting with version `5.14`, we can create debounced events, i.e. ensuring that event handler will be invoked only once during specific timeframe.
@@ -2,6 +2,8 @@
2
2
  title: "Themes"
3
3
  source: "https://www.amcharts.com/docs/v5/concepts/themes/"
4
4
  scraped: "2026-03-15"
5
+ updated: "2026-08-05"
6
+ updatedFor: "@amcharts/amcharts5@5.20.1"
5
7
  ---
6
8
 
7
9
  Themes can be used to apply a collection of settings to chart's elements easily, with a a single line of code.
@@ -62,6 +64,95 @@ A theme that can be used to enable responsive features of the chart - adapting s
62
64
 
63
65
  A theme that adds alternative default colors.
64
66
 
67
+ ## Themes added in 5.20.0
68
+
69
+ The list above is the pre-5.20 set. Version 5.20.0 added a large batch of palette themes, dark variants, and two parameterized themes. All live in `/themes` and load exactly like the others.
70
+
71
+ ### New palette themes
72
+
73
+ Theme name
74
+
75
+ Comment
76
+
77
+ `Colorblind`
78
+
79
+ A color-blindness-safe palette based on the Okabe-Ito color set.
80
+
81
+ `Ember`
82
+
83
+ A warm, fire-oriented palette.
84
+
85
+ `Midnight`
86
+
87
+ A dark theme.
88
+
89
+ `Nord`
90
+
91
+ A palette based on the Nord color scheme.
92
+
93
+ `Pastel`
94
+
95
+ A soft, low-saturation palette.
96
+
97
+ `Patterns`
98
+
99
+ Uses pattern fills instead of flat colors — useful for print, monochrome output, and accessibility.
100
+
101
+ `Petroleum`
102
+
103
+ A deep blue-green palette.
104
+
105
+ `Savanna`
106
+
107
+ A warm, earthy palette.
108
+
109
+ ### New dark variants
110
+
111
+ Dark counterparts were added for most palette themes: `ColorblindDark`, `DatavizDark`, `FrozenDark`, `KellyDark`, `MaterialDark`, `MoonriseDark`, `NordDark`, `PastelDark`, `PatternsDark`, `SpiritedDark`.
112
+
113
+ Each already carries dark background and interface colors, so you should NOT additionally apply the `Dark` theme when using one.
114
+
115
+ ### Parameterized themes: `Monochrome` and `Adaptive`
116
+
117
+ These two themes generate their palette from colors you supply, using OKLCH so the result stays perceptually balanced (even lightness/chroma, evenly spread hues). Because a theme cannot take constructor parameters, they ship as **factory functions** — call them with `(root, settings)`. A `.new(root, settings)` alias also works.
118
+
119
+ Both are additive: they do not modify any built-in theme.
120
+
121
+ `Monochrome` — a single-hue lightness ramp:
122
+
123
+ ```javascript
124
+ import am5themes_Monochrome from "@amcharts/amcharts5/themes/Monochrome";
125
+
126
+ root.setThemes([
127
+ am5themes_Animated.new(root),
128
+ am5themes_Monochrome(root, {
129
+ color: 0x2c6e91, // base color of the ramp; hex number, CSS string, or Color. Default: #2e7c9e (blue)
130
+ accent: 0xff7f0e, // optional: applied to the FIRST series only, so one series stands out
131
+ count: 7, // number of steps in the ramp. Default: 7
132
+ dark: false // true = dark background + interface colors, ramp runs light-to-mid. Default: false
133
+ })
134
+ ]);
135
+ ```
136
+
137
+ `Adaptive` — a full palette generated from one or two base colors:
138
+
139
+ ```javascript
140
+ import am5themes_Adaptive from "@amcharts/amcharts5/themes/Adaptive";
141
+
142
+ root.setThemes([
143
+ am5themes_Animated.new(root),
144
+ am5themes_Adaptive(root, {
145
+ baseColor: 0x2c6e91, // primary base color. The FIRST generated color is this color,
146
+ // so a brand color always appears in the chart.
147
+ // Default: green-to-yellow (#4b8e39 first, #ffdd00 last)
148
+ baseColor2: 0xffdd00, // optional: palette spans the two colors, interpolated in OKLCH,
149
+ // instead of fanning out from a single hue
150
+ count: 10, // number of series colors to generate. Default: 10
151
+ dark: false // true = faintly base-tinted dark background + matching interface colors
152
+ })
153
+ ]);
154
+ ```
155
+
65
156
  ## Applying
66
157
 
67
158
  Each chart can have multiple themes applied to it.
@@ -55,3 +55,4 @@ Extends: IPatternSettings
55
55
  - **gap** (`undefined | number`) — Default 6 Gap between rectangles, in pixels.
56
56
  - **maxHeight** (`undefined | number`) — Default 5 Maximum height of the rectangle, in pixels.
57
57
  - **maxWidth** (`undefined | number`) — Default 5 Maximum width of the rectangle, in pixels.
58
+ - **rotateShapes** (`undefined | false | true`) — Default false *(since 5.20.0)* If set to true, rotation rotates each rectangle around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
@@ -76,7 +76,9 @@ Extended by: IFlowSettings, IFlowNodesSettings, IPercentSeriesSettings, ILegendS
76
76
  - **customValueField** (`undefined | string`) — A key to look up in data for a numeric customValue of the data item. Usually used for storing additional numeric information and heat rules.
77
77
  - **excludeFromAggregate** (`Array`) — A list of field names to exclude from automatic aggregation when calculateAggregates is enabled. Use it to optimize performance by disabling automatic aggregation for data fields where aggregate values are not needed. @since 5.14.4
78
78
  - **fill** (`Color`) — Series fill color. Click here for more info
79
+ - **fillGradient** (`Gradient`) — *(since 5.20.0)* Series fill gradient.
79
80
  - **fillPattern** (`Pattern`) — Series fill pattern. Click here for more info @since 5.10.0
81
+ - **strokeGradient** (`Gradient`) — *(since 5.20.0)* Series stroke gradient.
80
82
  - **heatRules** (`IHeatRule[]`) — A list of heat rules to apply on series elements. Click here for more info
81
83
  - **idField** (`undefined | string`) — A key to look up in data for an id of the data item.
82
84
  - **legendDataItem** (`DataItem`) — A data item representing series in a Legend. @readonly
@@ -0,0 +1,38 @@
1
+ ---
2
+ title: "IStarPatternSettings"
3
+ type: "interface"
4
+ source: "https://www.amcharts.com/docs/v5/reference/istarpatternsettings/"
5
+ generatedFrom: "@amcharts/amcharts5@5.20.1"
6
+ ---
7
+
8
+ Settings for `StarPattern` (added in 5.20.0).
9
+
10
+ ## Inheritance
11
+
12
+ Extends: IPatternSettings
13
+
14
+ > **Note:** This interface also inherits all settings from IPatternSettings (and its ancestors). Use `get_doc` or `get_core_reference` with the parent interface name to see inherited members.
15
+
16
+ ## Properties
17
+
18
+ - **centered** (`undefined | false | true`) — Default true Center stars in their grid cell.
19
+ - **checkered** (`undefined | false | true`) — Default false If set to true, will place every second star, creating a checkered pattern.
20
+ - **gap** (`undefined | number`) — Default 6 Gap between stars, in pixels.
21
+ - **innerRadius** (`undefined | number | Percent`) — Default 50% Inner radius of the star. Either an absolute pixel value or a percent of radius.
22
+ - **radius** (`undefined | number`) — Default 5 Outer radius of the star, in pixels.
23
+ - **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each star around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
24
+ - **spikes** (`undefined | number`) — Default 5 Number of spikes.
25
+
26
+ ### Inherited from IPatternSettings
27
+
28
+ - **color** (`Color`) — Color of the pattern shape.
29
+ - **colorOpacity** (`undefined | number`) — Opacity of the pattern shape.
30
+ - **fill** (`Color`) — Color to fill gaps between pattern shapes.
31
+ - **fillOpacity** (`undefined | number`) — Opacity of the fill for gaps between pattern shapes.
32
+ - **height** (`undefined | number`) — Height of the pattern tile, in pixels.
33
+ - **repetition** (`"repeat" | "repeat-x" | "repeat-y" | "no-repeat"`) — How pattern tiles are repeated when filling the area.
34
+ - **rotation** (`undefined | number`) — Default 0 Rotation of pattern in degrees. Supported values: -90 to 90. See also `rotateShapes`.
35
+ - **strokeDasharray** (`number[] | number`) — Stroke (border or line) dash settings.
36
+ - **strokeDashoffset** (`undefined | number`) — Stroke (border or line) dash offset.
37
+ - **strokeWidth** (`undefined | number`) — Default 1 Width of the pattern's line elements.
38
+ - **width** (`undefined | number`) — Width of the pattern tile, in pixels.
@@ -0,0 +1,37 @@
1
+ ---
2
+ title: "ITrianglePatternSettings"
3
+ type: "interface"
4
+ source: "https://www.amcharts.com/docs/v5/reference/itrianglepatternsettings/"
5
+ generatedFrom: "@amcharts/amcharts5@5.20.1"
6
+ ---
7
+
8
+ Settings for `TrianglePattern` (added in 5.20.0).
9
+
10
+ ## Inheritance
11
+
12
+ Extends: IPatternSettings
13
+
14
+ > **Note:** This interface also inherits all settings from IPatternSettings (and its ancestors). Use `get_doc` or `get_core_reference` with the parent interface name to see inherited members.
15
+
16
+ ## Properties
17
+
18
+ - **centered** (`undefined | false | true`) — Default true Center triangles in their grid cell.
19
+ - **checkered** (`undefined | false | true`) — Default false If set to true, will place every second triangle, creating a checkered pattern.
20
+ - **gap** (`undefined | number`) — Default 6 Gap between triangles, in pixels.
21
+ - **maxHeight** (`undefined | number`) — Default 8 Height of the triangle, in pixels.
22
+ - **maxWidth** (`undefined | number`) — Default 8 Width of the triangle, in pixels.
23
+ - **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each triangle around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
24
+
25
+ ### Inherited from IPatternSettings
26
+
27
+ - **color** (`Color`) — Color of the pattern shape.
28
+ - **colorOpacity** (`undefined | number`) — Opacity of the pattern shape.
29
+ - **fill** (`Color`) — Color to fill gaps between pattern shapes.
30
+ - **fillOpacity** (`undefined | number`) — Opacity of the fill for gaps between pattern shapes.
31
+ - **height** (`undefined | number`) — Height of the pattern tile, in pixels.
32
+ - **repetition** (`"repeat" | "repeat-x" | "repeat-y" | "no-repeat"`) — How pattern tiles are repeated when filling the area.
33
+ - **rotation** (`undefined | number`) — Default 0 Rotation of pattern in degrees. Supported values: -90 to 90. See also `rotateShapes`.
34
+ - **strokeDasharray** (`number[] | number`) — Stroke (border or line) dash settings.
35
+ - **strokeDashoffset** (`undefined | number`) — Stroke (border or line) dash offset.
36
+ - **strokeWidth** (`undefined | number`) — Default 1 Width of the pattern's line elements.
37
+ - **width** (`undefined | number`) — Width of the pattern tile, in pixels.
@@ -57,20 +57,36 @@ Extends: ISeriesSettings
57
57
 
58
58
  ## Properties
59
59
 
60
- - **angles** (`number[]`) — An array of possible rotation angles for words.
60
+ - **allowNesting** (`undefined | false | true`) — Default true *(since 5.20.1)* Whether words may nest into each other's empty space. When true a word is packed against its neighbors' letters, so small words tuck into the concavities of bigger ones and the cloud packs tightly — but bounding boxes may overlap. Set to false to pack whole bounding boxes instead, so they never overlap (useful when labels have an opaque background, whose rectangles would otherwise slide into a neighbor's gaps).
61
+ - **angles** (`number[]`) — Default [0, -90] An array of possible rotation angles for words. As of 5.20.1 any angle is supported (e.g. [0, -30, -45]); earlier versions only handled 0, 90 and -90. Note that an overly wide word may still be flipped to 0 or ±90 for a better fit, but only if that value is present in the array.
61
62
  - **animationDuration** (`undefined | number`) — Duration of word animation when chart resizes.
62
63
  - **animationEasing** (`undefined | ( t: Time) => Time`) — Default am5.ease.out($ease.cubic) An easing function to use for word animations. Click here for more info
63
- - **autoFit** (`undefined | false | true`) — Default false
64
+ - **autoFit** (`undefined | false | true`) — Default true (set by WordCloudDefaultTheme; the typings' @default false is stale) Indicates whether font sizes are scaled down so all words fit the available area.
64
65
  - **categoryField** (`undefined | string`) — A field in data that holds category names.
65
66
  - **colors** (`ColorSet`) — A ColorSet to use when asigning colors for slices.
66
- - **excludeWords** (`Array`) — Array of words exclude from cloud.
67
+ - **excludeWords** (`Array`) — Default [] Array of words exclude from cloud.
67
68
  - **fillField** (`undefined | string`) — A field that holds color for label fill.
69
+ - **maskByShape** (`undefined | false | true`) — Default false *(since 5.20.1)* If set to true, words are clipped to the svgPath shape, so the parts of letters that overhang the outline (see shapeTolerance) are cut off at the edge for a crisp silhouette. Requires svgPath.
68
70
  - **maxCount** (`undefined | number`) — Maximum number of words to show.
69
- - **maxFontSize** (`number | Percent`) — Absolute or relative font size for the biggest words.
70
- - **minFontSize** (`number | Percent`) — Absolute or relative font size for the smallest words.
71
+ - **maxFontSize** (`number | Percent`) — Default 15% Absolute or relative font size for the biggest words.
72
+ - **minFontSize** (`number | Percent`) — Default 2% Absolute or relative font size for the smallest words.
71
73
  - **minValue** (`undefined | number`) — Minimum occurances for a word to be included into cloud.
72
- - **minWordLength** (`undefined | number`) — Minimum number of characters for a word to be included in the cloud.
74
+ - **minWordLength** (`undefined | number`) — Default 1 Minimum number of characters for a word to be included in the cloud.
73
75
  - **progress** (`undefined | number`) — Progress of current word layout animation. (0-1) @readonly
74
- - **randomness** (`undefined | number`) — Randomness of word placement (0-1).
75
- - **step** (`undefined | number`) — Step for next word placement.
76
+ - **randomizeAngles** (`undefined | false | true`) — Default true *(since 5.20.1)* How a word's rotation is chosen from angles. When true each word picks a random angle from angles, so the cloud looks different on every layout. When false words cycle through angles in order (word 0 gets angles[0], word 1 angles[1], and so on), which — together with randomness: 0 — makes the layout reproducible.
77
+ - **randomness** (`undefined | number`) — Default 0 Randomness of word placement (0-1).
78
+ - **shapeTolerance** (`undefined | number`) — Default 0 *(since 5.20.1)* Extra distance (in pixels) a word may extend past the svgPath outline, on top of the automatic per-word overhang (a fraction of each word's own size). Can also be negative to pull words further inside the outline, creating visual padding between the words and the shape edge. Only affects placement — the drawn shape outline is unchanged. Requires svgPath.
79
+ - **step** (`undefined | number`) — Default 15 Step for next word placement.
80
+ - **svgPath** (`undefined | string`) — *(since 5.20.1)* Experimental: if set, words are arranged to fill this shape. The path is scaled proportionally to fit the plot area. The fit is approximate — favor simple, bold shapes over complex, thin, or highly concave ones, and tune shapeTolerance, maskByShape, angles (and minFontSize/maxFontSize) to get a better fill for a particular shape.
76
81
  - **text** (`undefined | string`) — Source text from which words are extracted.
82
+
83
+ ### Inherited from ISeriesSettings (notable for WordCloud)
84
+
85
+ - **sequencedInterpolation** (`undefined | false | true`) — Default true (set by WordCloudDefaultTheme) Staggers the word reveal instead of showing all words at once.
86
+ - **sequencedDelay** (`undefined | number`) — Default 15 Milliseconds between words when sequencedInterpolation is enabled.
87
+
88
+ ## Breaking change in 5.20.1
89
+
90
+ The WordCloud layout is now computed synchronously in a single pass instead of one word per animation frame — much faster for large clouds. The per-data-item `ghostLabel` is removed and labels are held in an internal container, so code reading `dataItem.get("ghostLabel")` or walking `series.children` for labels needs updating. Use `series.labels` (a `ListTemplate<Label>`) or `dataItem.get("label")` instead.
91
+
92
+ A `series.shape` (`Graphics`) element was added; it draws the `svgPath` outline behind the words. Its geometry and `forceHidden` are managed by the series — only `fill`/`stroke` styling is yours to set.
@@ -82,6 +82,8 @@ Extended by: IRadarChartSettings, IStockPanelSettings, ICurveChartSettings
82
82
  - **pinchZoomY** (`undefined | false | true`) — Default false If set to true, using pinch gesture on the chart's plot area will zoom chart vertically. NOTE: this setting is not supported in a RadarChart. Click here for more info @since 5.1.8
83
83
  - **scrollbarX** (`Scrollbar`) — horizontal scrollbar. Click here for more info
84
84
  - **scrollbarY** (`Scrollbar`) — Vertical scrollbar.
85
+ - **strokeDasharrays** (`Array<number | Array<number>>`) — *(since 5.20.0)* A list of stroke dash arrays to cycle through for line series as they are added, the same way colors cycles series colors. Each entry is a strokeDasharray value (an array of dash/gap lengths, or a single number); 0 or an empty array is a solid line.
86
+ - **strokeWidths** (`Array<number>`) — *(since 5.20.0)* A list of stroke widths (in pixels) to cycle through for line series as they are added, the same way colors cycles series colors. Each added line series is given the next width based on its position. Useful for telling line series apart without relying on color (e.g. the "Patterns" theme).
85
87
  - **wheelStep** (`undefined | number`) — Default 0.25 Indicates the relative "speed" of the mouse wheel.
86
88
  - **wheelX** (`"zoomX" | "zoomY" | "zoomXY" | "panX" | "panY" | "panXY" | "none"`) — Indicates what happens when mouse wheel is spinned horizontally while over plot area. Click here for more info
87
89
  - **wheelY** (`"zoomX" | "zoomY" | "zoomXY" | "panX" | "panY" | "panXY" | "none"`) — Indicates what happens when mouse wheel is spinned vertically while over plot area. Click here for more info
@@ -85,6 +85,7 @@ Extended by: IRadarCursorSettings, ICurveCursorSettings
85
85
 
86
86
  - **alwaysShow** (`undefined | false | true`) — Default false If set to true, cursor will not be hidden when mouse cursor moves out of the plot area.
87
87
  - **behavior** (`"zoomX" | "zoomY" | "zoomXY" | "selectX" | "selectY" | "selectXY" | "none"`) — Default "none" What should cursor do when dragged across plot area. Click here for more info
88
+ - **clickTolerance** (`undefined | number`) — Default 0 *(since 5.20.0)* How far (in pixels) outside the plot area a press can start and still begin a zoom/selection, when behavior is set to a zoom or select mode. Makes it easier to start selecting near the edges of the plot area. The selection still starts on the edge of the plot area (the press point is clamped into it). A value of 0 (default) disables this and keeps the original behavior: a selection can only start within the plot area.
88
89
  - **moveThreshold** (`undefined | number`) — Default 1 Minimum distance in pixels between down and up points. If a distance is less than the value of moveThreshold, the zoom or selection won't happen. @since 5.2.20
89
90
  - **positionX** (`undefined | number`) — Cursor's horizontal position relative to plot area. If this setting is set, cursor will not react to mouse/touch and will just sit at specified position until positionX is reset to undefined. 0 - left, 1 - right.
90
91
  - **positionY** (`undefined | number`) — Cursor's vertical position relative to plot area. If this setting is set, cursor will not react to mouse/touch and will just sit at specified position until positionY is reset to undefined. 0 - left, 1 - right.
@@ -0,0 +1,51 @@
1
+ ---
2
+ title: "StarPattern"
3
+ type: "class"
4
+ source: "https://www.amcharts.com/docs/v5/reference/starpattern/"
5
+ generatedFrom: "@amcharts/amcharts5@5.20.1"
6
+ ---
7
+
8
+ Star pattern. Draws a grid of stars, used as a `fillPattern` or `strokePattern` on any element.
9
+
10
+ Added in 5.20.0.
11
+
12
+ ## Import
13
+
14
+ ```javascript
15
+ // Import StarPattern
16
+ import * as am5 from "@amcharts/amcharts5"
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```javascript
22
+ columnSeries.columns.template.set("fillPattern", am5.StarPattern.new(root, {
23
+ color: am5.color(0xffffff),
24
+ radius: 5,
25
+ innerRadius: am5.percent(50),
26
+ spikes: 5,
27
+ gap: 6
28
+ }));
29
+ ```
30
+
31
+ ## Inheritance
32
+
33
+ Extends: Pattern
34
+
35
+ > **Note:** This class also inherits all settings, properties, methods, and events from Pattern (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
36
+
37
+ ## Settings
38
+
39
+ - **centered** (`undefined | false | true`) — Default true Center stars in their grid cell.
40
+ - **checkered** (`undefined | false | true`) — Default false If set to true, will place every second star, creating a checkered pattern.
41
+ - **gap** (`undefined | number`) — Default 6 Gap between stars, in pixels.
42
+ - **innerRadius** (`undefined | number | Percent`) — Default 50% Inner radius of the star. Either an absolute pixel value or a percent of radius.
43
+ - **radius** (`undefined | number`) — Default 5 Outer radius of the star, in pixels.
44
+ - **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each star around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
45
+ - **spikes** (`undefined | number`) — Default 5 Number of spikes.
46
+
47
+ See `IStarPatternSettings` (`reference/istarpatternsettings`) for the full settings list including everything inherited from `IPatternSettings`.
48
+
49
+ ## Notes
50
+
51
+ A star pattern's tile is only a repeat unit — the grid repeats every cell — so an oversized `width`/`height` just wastes memory and draw time for an identical result. The class normalizes the tile to a single cell (2x2 cells when `checkered`). This optimization is skipped for a whole-pattern `rotation` (which isn't periodic on an axis-aligned tile — use `rotateShapes` for that) and for non-`repeat` repetitions.
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: "TrianglePattern"
3
+ type: "class"
4
+ source: "https://www.amcharts.com/docs/v5/reference/trianglepattern/"
5
+ generatedFrom: "@amcharts/amcharts5@5.20.1"
6
+ ---
7
+
8
+ Triangle pattern. Draws a grid of triangles, used as a `fillPattern` or `strokePattern` on any element.
9
+
10
+ Added in 5.20.0.
11
+
12
+ ## Import
13
+
14
+ ```javascript
15
+ // Import TrianglePattern
16
+ import * as am5 from "@amcharts/amcharts5"
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```javascript
22
+ columnSeries.columns.template.set("fillPattern", am5.TrianglePattern.new(root, {
23
+ color: am5.color(0xffffff),
24
+ maxWidth: 8,
25
+ maxHeight: 8,
26
+ gap: 6
27
+ }));
28
+ ```
29
+
30
+ ## Inheritance
31
+
32
+ Extends: Pattern
33
+
34
+ > **Note:** This class also inherits all settings, properties, methods, and events from Pattern (and its ancestors). Use `get_doc` or `get_core_reference` with the parent class name to see inherited members.
35
+
36
+ ## Settings
37
+
38
+ - **centered** (`undefined | false | true`) — Default true Center triangles in their grid cell.
39
+ - **checkered** (`undefined | false | true`) — Default false If set to true, will place every second triangle, creating a checkered pattern.
40
+ - **gap** (`undefined | number`) — Default 6 Gap between triangles, in pixels.
41
+ - **maxHeight** (`undefined | number`) — Default 8 Height of the triangle, in pixels.
42
+ - **maxWidth** (`undefined | number`) — Default 8 Width of the triangle, in pixels.
43
+ - **rotateShapes** (`undefined | false | true`) — Default false If set to true, rotation rotates each triangle around its own center while the grid/tile stays axis-aligned, instead of rotating the whole pattern. This tiles seamlessly (a small width/height is enough) and is much faster than rotating the whole pattern on large tiles.
44
+
45
+ See `ITrianglePatternSettings` (`reference/itrianglepatternsettings`) for the full settings list including everything inherited from `IPatternSettings`.
46
+
47
+ ## Notes
48
+
49
+ A triangle pattern's tile is only a repeat unit — the grid repeats every cell — so an oversized `width`/`height` just wastes memory and draw time for an identical result. The class normalizes the tile to a single cell (2x2 cells when `checkered`). This optimization is skipped for a whole-pattern `rotation` (which isn't periodic on an axis-aligned tile — use `rotateShapes` for that) and for non-`repeat` repetitions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amcharts/amcharts5-mcp",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "mcpName": "io.github.amcharts/amcharts5",
5
5
  "description": "On-demand access to amCharts 5 docs, code examples, and API reference",
6
6
  "type": "module",
@@ -12,6 +12,7 @@
12
12
  "src/",
13
13
  "content/",
14
14
  "extended/",
15
+ "!extended/reference-generated/",
15
16
  "README.md",
16
17
  "LICENSE"
17
18
  ],
package/src/content-fs.js CHANGED
@@ -25,6 +25,14 @@ const REFERENCES_DIR = existsSync(join(SKILL_DIR, "references"))
25
25
  : SKILL_DIR;
26
26
  const EXTENDED_DIR = join(ROOT, "extended");
27
27
 
28
+ // Directories under extended/ that must never be served. `reference-generated/`
29
+ // is work-in-progress output from scripts/generate-reference.cjs: it duplicates
30
+ // every page in reference/ under a second key, which makes search return each
31
+ // class twice and advertises an unfinished section via get_doc. It is untracked,
32
+ // but untracked does NOT mean unpublished — `files: ["extended/"]` packs from the
33
+ // filesystem, so without this it also ships in the npm tarball.
34
+ const EXTENDED_SKIP_DIRS = new Set(["reference-generated"]);
35
+
28
36
  /**
29
37
  * Read all skill + extended markdown into the raw { skillFiles, extendedFiles }
30
38
  * shape that buildContent() expects.
@@ -58,6 +66,8 @@ function walkExtended(dir, prefix, out) {
58
66
  for (const entry of readdirSync(dir, { withFileTypes: true })) {
59
67
  const fullPath = join(dir, entry.name);
60
68
  if (entry.isDirectory()) {
69
+ // Only skip at the top level — a nested dir of the same name is fine.
70
+ if (!prefix && EXTENDED_SKIP_DIRS.has(entry.name)) continue;
61
71
  walkExtended(fullPath, prefix ? `${prefix}/${entry.name}` : entry.name, out);
62
72
  } else if (entry.name.endsWith(".md")) {
63
73
  const key = prefix