Skip to content

Commit 2dea73c

Browse files
committed
Version 5.20.1
1 parent 4350c3f commit 2dea73c

17 files changed

Lines changed: 1272 additions & 226 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@amcharts/amcharts5",
4-
"version": "5.20.0",
4+
"version": "5.20.1",
55
"author": "amCharts <contact@amcharts.com> (https://www.amcharts.com/)",
66
"description": "amCharts 5",
77
"homepage": "https://www.amcharts.com/",

packages/geodata/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
55
Please note, that this project, while following numbering syntax, it DOES NOT
66
adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
77

8-
## [UNRELEASED] - 2026-07-17
8+
## [UNRELEASED] - ????-??-??
9+
10+
11+
## [5.1.6] - 2026-07-27
912

1013
### Added
1114
- Congressional map set for US 120th Congress: `region/usa/congressional120/*`. Includes proposed changes for AL, CA, FL, NC, OH, TX, TN, UT. Pending: MO, LA.

packages/geodata/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@amcharts/amcharts5-geodata",
3-
"version": "5.1.5",
3+
"version": "5.1.6",
44
"author": "amCharts <contact@amcharts.com> (https://www.amcharts.com/)",
55
"description": "amCharts 5 Geo Data",
66
"homepage": "https://www.amcharts.com/",

packages/shared/CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,28 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
55
Please note, that this project, while following numbering syntax, it DOES NOT
66
adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
77

8+
## [5.20.1] - 2026-08-03
9+
10+
### Added
11+
- `WordCloud`: new `svgPath` setting arranges words into a shape; `maskByShape` clips words to the outline, and `shapeTolerance` sets how far they may spill past it (negative pulls them inside for padding).
12+
- `WordCloud`: new `randomizeAngles` setting — set to `false` to cycle `angles` in order for a reproducible layout.
13+
- `WordCloud`: new `allowNesting` setting — set to `false` to pack words as non-overlapping bounding boxes instead of nesting into each other's gaps (useful with opaque label backgrounds).
14+
15+
### Changed
16+
- `WordCloud` now computes its layout 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.
17+
- `WordCloud` word reveal can be staggered via `sequencedInterpolation`/`sequencedDelay`.
18+
19+
### Fixed
20+
- Removing a `Container`'s `mask` (setting it to `undefined`) no longer leaves its children clipped by the removed mask. Also fixes bullet clipping getting stuck after toggling `maskBullets` off on radar/curve charts.
21+
- Timeline curve charts (`SerpentineChart`/`SpiralChart`/`CurveChart`): setting an axis renderer's `rotateLabels` back to `false` did not un-rotate the labels.
22+
- A line series bullet with no paint of its own (relying on inheriting the series color) was invisible in the legend marker.
23+
- `ArcDiagram`: bullets on links whose target comes before their source were placed on the wrong side of the nodes, mirroring the arc instead of following it.
24+
- `ArcDiagram`: hiding a node made all the remaining node circles shrink disproportionately.
25+
- Flow charts: setting a link's `fillStyle`/`strokeStyle` back to `"solid"` after using `"source"`, `"target"` or `"none"` kept the old color instead of restoring the solid one.
26+
- A bullet with no fill of its own now takes the color of its own slice or node on pie, funnel, flow and hierarchy charts, instead of the series color.
27+
- Acceleration Bands legend now shows the same scaled `factor` as the settings modal (`1` instead of `0.001`).
28+
29+
830
## [5.20.0] - 2026-07-22
931

1032
### Added
@@ -33,6 +55,7 @@ adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
3355
- Accessibility: The `<div>` that holds chart's focusable elements will now have its `aria-label` set if `ariaLabel` is provided in `Root` settings.
3456

3557
### Fixed
58+
- `WordCloud` was not re-laying-out when its `randomness` setting was changed dynamically.
3659
- Logarithmic `ValueAxis` could show floating-point noise in its grid labels (e.g. `4,999.999999999999` instead of `5,000`). Grid values are now rounded.
3760
- Logarithmic `ValueAxis` was showing `0` for grid values smaller than `0.00001` when no `numberFormat` was set
3861
- `ValueAxis` with `syncWithAxis` and `autoZoom: false` regressed in 5.19.0: wrong scale and a possible browser hang.

src/.internal/charts/flow/ArcDiagram.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,24 @@ export class ArcDiagram extends Flow {
143143
width = this.innerWidth();
144144
}
145145

146-
let sum = 0;
146+
let sumNoLow = 0;
147147
let low = Infinity;
148148
let radiusKey = this.get("radiusKey");
149149

150150
if (radiusKey != "none") {
151+
// from the full values, not the animating ones, so hiding or showing
152+
// a node doesn't rescale all the others mid-animation
151153
$array.each(this.nodes.dataItems, (dataItem) => {
152-
let value = dataItem.get(radiusKey + "Working" as any);
153-
sum += value;
154-
low = Math.min(low, value);
154+
low = Math.min(low, dataItem.get(radiusKey as any));
155+
})
156+
157+
if (low == Infinity) {
158+
low = 0;
159+
}
160+
161+
// must match the radius formula below, or the row won't fit the width
162+
$array.each(this.nodes.dataItems, (dataItem) => {
163+
sumNoLow += Math.max(0, dataItem.get(radiusKey + "Working" as any) - low);
155164
})
156165
}
157166

@@ -165,8 +174,7 @@ export class ArcDiagram extends Flow {
165174
width = 0;
166175
}
167176

168-
let sumNoLow = sum - count * low;
169-
let c = width / sumNoLow;
177+
let c = sumNoLow > 0 ? width / sumNoLow : 0;
170178

171179
let prevCoord = 0;
172180
const animationDuration = this.get("animationDuration", 0);
@@ -176,7 +184,7 @@ export class ArcDiagram extends Flow {
176184
let value = dataItem.get(radiusKey + "Working" as any);
177185

178186
const node = dataItem.get("node");
179-
let radius = minRadius + c * (value - low) / 2;
187+
let radius = minRadius + c * Math.max(0, value - low) / 2;
180188

181189
if (radiusKey == "none") {
182190
radius = minRadius + width / count / 2;

src/.internal/charts/flow/ArcDiagramLink.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,16 @@ export class ArcDiagramLink extends FlowLink {
152152
if (this._p0 && this._p1) {
153153
const radius = this._radius;
154154

155+
// radius is signed, but the arc is always drawn bulging one way
156+
const bulge = Math.abs(radius);
157+
155158
if (this.getPrivate("orientation") == "vertical") {
156159
let angle = -90 + 180 * location;
157-
return { y: this._p0.y + radius + radius * $math.sin(angle), x: radius * $math.cos(angle), angle: angle + 90 };
160+
return { y: this._p0.y + radius + radius * $math.sin(angle), x: bulge * $math.cos(angle), angle: angle + 90 };
158161
}
159162
else {
160163
let angle = 180 + 180 * location;
161-
return { x: this._p0.x + radius + radius * $math.cos(angle), y: radius * $math.sin(angle), angle: angle + 90 };
164+
return { x: this._p0.x + radius + radius * $math.cos(angle), y: bulge * $math.sin(angle), angle: angle + 90 };
162165
}
163166
}
164167
return { x: 0, y: 0, angle: 0 };

src/.internal/charts/flow/Flow.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ export abstract class Flow extends Series {
394394
switch (fillStyle) {
395395

396396
case "solid":
397+
// other styles set fill on the link itself, which would win over the template
398+
link.remove("fill");
397399
link._applyTemplates();
398400
break;
399401
case "source":
@@ -430,6 +432,7 @@ export abstract class Flow extends Series {
430432

431433
switch (strokeStyle) {
432434
case "solid":
435+
link.remove("stroke");
433436
link._applyTemplates();
434437
break;
435438

src/.internal/charts/stock/indicators/AccelerationBands.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import type { Color } from "../../../core/util/Color";
44
import { Indicator, IIndicatorSettings, IIndicatorPrivate, IIndicatorEvents } from "./Indicator";
55
import { LineSeries } from "../../xy/series/LineSeries";
66

7+
// factor is stored in thousandths, but shown as 1 = single band width
8+
const FACTOR_SCALE = 1000;
9+
710
export interface IAccelerationBandsSettings extends IIndicatorSettings {
811
/**
912
* A color for upper section.
@@ -71,7 +74,7 @@ export class AccelerationBands extends Indicator {
7174
step: 0.0001,
7275
// Stored in thousandths (0.001 = standard bands); shown in the UI as the
7376
// conventional 1 = single band width (so the field reads 0.5..3.0).
74-
scale: 1000
77+
scale: FACTOR_SCALE
7578
}, {
7679
key: "upperColor",
7780
name: this.root.language.translateAny("Upper"),
@@ -148,7 +151,8 @@ export class AccelerationBands extends Indicator {
148151

149152
if (this.isDirty("factor")) {
150153
this.markDataDirty();
151-
this.setCustomData("factor", this.get("factor"));
154+
// legend shows the same scaled value as the settings modal
155+
this.setCustomData("factor", this.get("factor", 0.001) * FACTOR_SCALE);
152156
}
153157
}
154158

src/.internal/charts/timeline/AxisRendererCurveX.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ export class AxisRendererCurveX extends AxisRenderer {
115115
const yRenderer = this.get("yRenderer");
116116
yRenderer.set("xRenderer", this);
117117
}
118+
119+
if (this.isDirty("rotateLabels")) {
120+
// re-run the label loop so `updateLabel` applies (or clears) rotation
121+
this.axis.markDirtySize();
122+
}
118123
}
119124

120125
/**
@@ -532,6 +537,10 @@ export class AxisRendererCurveX extends AxisRenderer {
532537
if (this.get("rotateLabels", true)) {
533538
label.set("rotation", angle - 90);
534539
}
540+
else {
541+
// reset, so turning `rotateLabels` off again unrotates the labels
542+
label.set("rotation", 0);
543+
}
535544

536545
this.toggleVisibility(label, position, label.get("minPosition", 0), label.get("maxPosition", 1));
537546
}

src/.internal/charts/timeline/AxisRendererCurveY.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ export class AxisRendererCurveY extends AxisRenderer {
108108
if (this.isDirty("axisLength")) {
109109
this.updateLayout();
110110
}
111+
112+
if (this.isDirty("rotateLabels")) {
113+
// re-run the label loop so `updateLabel` applies (or clears) rotation
114+
this.axis.markDirtySize();
115+
}
111116
}
112117

113118
/**
@@ -244,6 +249,10 @@ export class AxisRendererCurveY extends AxisRenderer {
244249
if (this.get("rotateLabels", true)) {
245250
label.set("rotation", angle);
246251
}
252+
else {
253+
// reset, so turning `rotateLabels` off again unrotates the labels
254+
label.set("rotation", 0);
255+
}
247256
}
248257

249258
this.toggleVisibility(label, position, label.get("minPosition", 0), label.get("maxPosition", 1));

0 commit comments

Comments
 (0)