Skip to content

Commit 106ee67

Browse files
committed
Version 5.11.0
1 parent 2f13243 commit 106ee67

File tree

13 files changed

+186
-63
lines changed

13 files changed

+186
-63
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@amcharts/amcharts5",
4-
"version": "5.10.12",
4+
"version": "5.11.0",
55
"author": "amCharts <[email protected]> (https://www.amcharts.com/)",
66
"description": "amCharts 5",
77
"homepage": "https://www.amcharts.com/",

packages/shared/CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ 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.11.0] - 2025-02-03
9+
10+
### Added
11+
- New `Root` property: `entitiesById`. Contains all Entities belonging to this `Root` instance that have an `id` set.
12+
13+
### Changed
14+
- From now on, unique `id` for Entities will be enforced within Root scope, not global scope.
15+
- `StockChart`'s indicators had axes tooltips and cursor horizontal line hardcoded with `forceHidden: true`. It was moved to a default theme, so now you can enable them using custom theme.
16+
17+
### Fixed
18+
- Overlapping interactive elements were ignoring `layer` setting.
19+
- Improved handling of focusing of Series' elements.
20+
- `toggleDrawing` of `StockChart` was not hiding/showing grips if called from outside until hovered over the chart.
21+
- Changing stroke/fill drawing setting in `StockChart` drawing toolbar would update colors for existing Fibonacci drawings.
22+
23+
824
## [5.10.12] - 2025-01-23
925

1026
### Fixed

src/.internal/charts/stock/StockChart.ts

-1
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ export class StockChart extends Container {
406406
}
407407

408408
public _prepareChildren() {
409-
410409
if (this.isDirty("drawingSelectionEnabled")) {
411410
const enabled = this.get("drawingSelectionEnabled", false);
412411
if (!enabled) {

src/.internal/charts/stock/drawing/DrawingSeries.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1056,13 +1056,14 @@ export class DrawingSeries extends LineSeries {
10561056

10571057
public toggleDrawing(enabled?: boolean) {
10581058
if(this._getStockChart().get("hideDrawingGrips")){
1059+
this.circles.getIndex(0)?.markDirty();
10591060
this.root.events.once("frameended", () => {
10601061
this.circles.each((circle) => {
10611062
circle.set("forceHidden", !enabled);
10621063
})
10631064
this.grips.each((grip) => {
10641065
grip.set("forceInactive", !enabled);
1065-
})
1066+
})
10661067
})
10671068
}
10681069
}

src/.internal/charts/stock/drawing/FibonacciSeries.ts

+14-2
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export class FibonacciSeries extends SimpleLineSeries {
8585
if (line) {
8686
const diP1 = this._di[i]["p1"];
8787
const diP2 = this._di[i]["p2"];
88+
const di = this._di[i]["e"];
89+
const dataContext = di.dataContext as any;
90+
const strokeTemplate = dataContext.stroke;
8891

8992
if (diP1 && diP2) {
9093

@@ -111,9 +114,18 @@ export class FibonacciSeries extends SimpleLineSeries {
111114
let strokeColor = fillColor;
112115

113116
fill.set("fill", fillColor);
114-
fill.set("fillOpacity", this.get("fillOpacity", 0));
115117
stroke.set("stroke", strokeColor);
116-
stroke.set("strokeOpacity", this.get("strokeOpacity", 0));
118+
119+
let strokeOpacity;
120+
if(strokeTemplate){
121+
strokeOpacity = strokeTemplate.get("strokeOpacity");
122+
}
123+
124+
if(strokeOpacity == undefined){
125+
strokeOpacity = this.get("strokeOpacity", 0);
126+
}
127+
128+
stroke.set("strokeOpacity", strokeOpacity);
117129

118130
const y1 = p1.y + (p2.y - p1.y) * prevValue;
119131
const y2 = p1.y + (p2.y - p1.y) * -value;

src/.internal/charts/stock/drawing/FibonacciTimezoneSeries.ts

+26-3
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,34 @@ export class FibonacciTimezoneSeries extends FibonacciSeries {
9090
stroke.setPrivate("visible", true);
9191

9292
const fillTemplate = dataContext.fill;
93+
const strokeTemplate = dataContext.stroke;
94+
9395
let fillColor = this.get("colors", [])[i];
9496
let strokeColor = fillColor;
9597

96-
fill.set("fillOpacity", this.get("fillOpacity", 0) * 0.2);
97-
stroke.set("strokeOpacity", this.get("strokeOpacity", 0));
98+
let fillOpacity;
99+
if(fillTemplate){
100+
fillOpacity = fillTemplate.get("fillOpacity");
101+
}
102+
103+
if(fillOpacity == undefined){
104+
fillOpacity = this.get("fillOpacity", 0);
105+
}
106+
107+
fillOpacity = fillOpacity * 0.2;
108+
fill.set("fillOpacity", fillOpacity);
109+
110+
111+
let strokeOpacity;
112+
if(strokeTemplate){
113+
strokeOpacity = strokeTemplate.get("strokeOpacity");
114+
}
115+
116+
if(strokeOpacity == undefined){
117+
strokeOpacity = this.get("strokeOpacity", 0);
118+
}
119+
120+
stroke.set("strokeOpacity", strokeOpacity);
98121

99122
if (!fillColor) {
100123

@@ -108,7 +131,7 @@ export class FibonacciTimezoneSeries extends FibonacciSeries {
108131
}
109132

110133
if (!strokeColor) {
111-
const strokeTemplate = dataContext.stroke;
134+
112135
if (strokeTemplate) {
113136
strokeColor = strokeTemplate.get("stroke");
114137
}

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export abstract class ChartIndicator extends Indicator {
4343
public legend!: StockLegend;
4444

4545
protected _themeTag?: string;
46-
protected _themeTags:Array<string> = ["indicator"];
46+
protected _themeTags: Array<string> = ["indicator"];
4747

4848
protected _afterNew() {
4949
super._afterNew();
@@ -84,18 +84,20 @@ export abstract class ChartIndicator extends Indicator {
8484
xAxis.set("groupData", seriesXAxis.get("groupData"));
8585
xAxis.set("groupCount", seriesXAxis.get("groupCount"));
8686

87-
xAxis.set("tooltip", Tooltip.new(root, { forceHidden: true }));
87+
xAxis.set("tooltip", Tooltip.new(root, { themeTags: ["indicator"] }));
8888

8989
xAxis.setAll({ start: start, end: end })
9090
this.xAxis = xAxis;
9191

9292
// yAxis
9393
const yRenderer = AxisRendererY.new(root, {
94-
minGridDistance:20
94+
minGridDistance: 20
9595
});
96+
const yTooltip = Tooltip.new(root, { themeTags: ["indicator"] });
97+
9698
const yAxis = chart.yAxes.push(ValueAxis.new(root, {
9799
renderer: yRenderer,
98-
tooltip: Tooltip.new(root, { forceHidden: true })
100+
tooltip: yTooltip
99101
}))
100102
this.yAxis = yAxis;
101103

src/.internal/core/Registry.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export class Registry {
66
/**
77
* Currently running version of amCharts.
88
*/
9-
readonly version: string = "5.10.12";
9+
readonly version: string = "5.11.0";
1010

1111
/**
1212
* List of applied licenses.

src/.internal/core/Root.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,13 @@ export class Root implements IDisposer {
368368
protected _htmlElementContainer: HTMLDivElement | undefined;
369369
protected _htmlEnabledContainers: Container[] = [];
370370

371+
/**
372+
* Entities that have their `id` setting set.
373+
*
374+
* @since 5.11.0
375+
*/
376+
public entitiesById: { [index: string]: any } = {};
377+
371378
protected constructor(id: string | HTMLElement, settings: IRootSettings = {}, isReal: boolean) {
372379

373380
if (!isReal) {
@@ -1573,7 +1580,7 @@ export class Root implements IDisposer {
15731580
focusElement.removeAttribute("aria-controls");
15741581
}
15751582

1576-
if (target.get("visible") && target.get("opacity") !== 0 && target.get("role") != "tooltip" && !target.isHidden() && target.getPrivate("focusable") !== false) {
1583+
if (target.get("visible") && target.get("opacity") !== 0 && target.get("role") != "tooltip" && !target.isHidden() && target.getPrivate("focusable") !== false && (target.height() || target.width())) {
15771584
if (focusElement.getAttribute("tabindex") != "-1") {
15781585
focusElement.setAttribute("tabindex", "" + this.tabindex);
15791586
}

src/.internal/core/render/Sprite.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ export abstract class Sprite extends Entity {
18651865
}
18661866
}
18671867

1868-
if (this.get("focusable") && this.isFocus()) {
1868+
if (this.get("focusable")) {
18691869
this.markDirtyAccessibility();
18701870
}
18711871
}

0 commit comments

Comments
 (0)