Skip to content

Commit 19fcf0a

Browse files
committed
Version 5.13.0
1 parent 95b0113 commit 19fcf0a

File tree

19 files changed

+600
-86
lines changed

19 files changed

+600
-86
lines changed

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.12.3",
4+
"version": "5.13.0",
55
"author": "amCharts <[email protected]> (https://www.amcharts.com/)",
66
"description": "amCharts 5",
77
"homepage": "https://www.amcharts.com/",

packages/shared/CHANGELOG.md

Lines changed: 16 additions & 1 deletion
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.13.0] - 2025-06-05
9+
10+
### Added
11+
- `exactLocationX` and `exactLocationY` added to `XYSeries`. If this is set to `true`, data items will ignore `locationX`/`locationY` setting but will place the data point at exact X/Y value. This will work only with `DateAxis`. If used on a `ColumnSeries`/`CandlestickSeries` it will affect its bullets only.
12+
- `autoHidePanelControls` added to `StockChart`.
13+
- `containStroke` added to `Rectangle`. If this is set to `true`, rectangle will be drawn in such a way that its stroke is contained within the rectangle's width and height. Useful if you have thicker `strokeWidth` for `ColumnSeries`.
14+
- Super Trend indicator added to `StockChart`.
15+
- `getFillGradientFromSprite` setting added to `Tooltip` (default: `false`).
16+
17+
### Fixed
18+
- Fixed unserialized drawings like doodles looking jagged (setitng `exactLocationX` to `true` by default on all drawings).
19+
- Improved step calculation on a logarithmic `ValueAxis`.
20+
- `Treemap` was not showing pointer cursor on active nodes.
21+
- `IndicatorControl` no longer will insert a custom indicator created in its callback into `StockChart`'s indicator list if it was already inserted in the callback.
22+
23+
824
## [5.12.3] - 2025-05-30
925

1026
### Added
@@ -46,7 +62,6 @@ adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
4662
- `"drawingsupdated"` event of `StockChart` was being dispatched when drawing was selected. (wasn't exactly fixed in `5.11.3`)
4763

4864

49-
5065
## [5.11.3] - 2025-04-09
5166

5267
### Added

src/.internal/charts/hierarchy/HierarchyDefaultTheme.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,14 @@ export class HierarchyDefaultTheme extends Theme {
425425
r("HierarchyNode", ["treemap", "node"]).setAll({
426426
tooltipY: percent(40),
427427
isMeasured: false,
428-
position: "absolute"
428+
position: "absolute",
429+
cursorOverStyle: "pointer"
429430
});
430431

432+
r("HierarchyNode", ["treemap", "node", "last"]).setAll({
433+
cursorOverStyle: "default"
434+
});
435+
431436
{
432437
const rule = r("RoundedRectangle", ["treemap", "node", "shape"]);
433438

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@ export interface IStockChartSettings extends IContainerSettings {
144144
*/
145145
hideDrawingGrips?: boolean;
146146

147+
/**
148+
* If set to `true`, panel controls will automatically hide when mouse is
149+
* not over the chart.
150+
*
151+
* @default false
152+
* @since 5.13.0
153+
*/
154+
autoHidePanelControls?: boolean;
155+
147156
}
148157

149158
export interface IStockChartPrivate extends IContainerPrivate {
@@ -870,12 +879,32 @@ export class StockChart extends Container {
870879
const index = this.panelsContainer.children.indexOf(panel);
871880
const len = this.panels.length;
872881
const visible = "visible"
882+
const autoHidePanelControls = this.get("autoHidePanelControls", false);
883+
884+
panelControls.set(visible, !autoHidePanelControls);
873885

874886
panelControls.upButton.setPrivate(visible, false);
875887
panelControls.downButton.setPrivate(visible, false);
876888
panelControls.expandButton.setPrivate(visible, false);
877889
panelControls.closeButton.setPrivate(visible, false);
878890

891+
892+
if(autoHidePanelControls) {
893+
panel.plotContainer.events.on("pointerover", () => {
894+
panelControls.show();
895+
})
896+
897+
panelControls.events.on("pointerover", () => {
898+
panelControls.show();
899+
})
900+
901+
panel.plotContainer.events.on("pointerout", () => {
902+
if(!panelControls.isHover()){
903+
panelControls.hide();
904+
}
905+
})
906+
}
907+
879908
if (len > 1) {
880909
panelControls.expandButton.setPrivate(visible, true);
881910

src/.internal/charts/stock/StockChartDefaultTheme.ts

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,15 @@ export class StockChartDefaultTheme extends Theme {
4646
strictMinMaxSelection: true
4747
},
4848
autoSetPercentScale: true,
49-
drawingSelectionEnabled: false
49+
drawingSelectionEnabled: false,
50+
autoHidePanelControls: false
5051
});
5152

5253
r("StockPanel").setAll({
5354
panY: true,
5455
wheelY: "zoomX",
5556
panX: true,
56-
minHeight: 1
57+
minHeight: 1
5758
});
5859

5960
r("StockPanel").states.create("hidden", {
@@ -679,6 +680,7 @@ export class StockChartDefaultTheme extends Theme {
679680
r("Grid", ["oversold"]).setAll({
680681
strokeOpacity: 0.4,
681682
});
683+
682684

683685
// series fill below oversold
684686
r("Graphics", ["overboughtoversold", "oversold", "fill"]).setAll({
@@ -687,11 +689,20 @@ export class StockChartDefaultTheme extends Theme {
687689
});
688690

689691
// series fill above oversold
692+
690693
r("Graphics", ["overboughtoversold", "overbought", "fill"]).setAll({
691694
visible: true,
692695
fillOpacity: 0.2
693696
});
694697

698+
r("Graphics", ["fill", "supertrend", "upper"]).setAll({
699+
fillOpacity: 0.2
700+
})
701+
702+
r("Graphics", ["fill", "supertrend", "lower"]).setAll({
703+
fillOpacity: 0.2
704+
})
705+
695706
r("Graphics", ["fill", "bollingerbands", "upper"]).setAll({
696707
fillOpacity: 0.2
697708
})
@@ -804,7 +815,7 @@ export class StockChartDefaultTheme extends Theme {
804815
r("LineSeries", ["movingaverage"]).setAll({
805816
legendValueText: "[{seriesColor} bold]{valueY.formatNumber('#.00')}[/]",
806817
legendLabelText: "{shortName} ({period.formatNumber('#.')},{field},{type},{offset.formatNumber('#.')})"
807-
})
818+
})
808819

809820
r("ColumnSeries", ["movingaveragedeviation"]).setAll({
810821
legendValueText: "[{deviationColor}; bold]{valueY.formatNumber('#.00')}[/]",
@@ -846,6 +857,11 @@ export class StockChartDefaultTheme extends Theme {
846857
legendLabelText: "{shortName} ({period.formatNumber('#.')},{kSmoothing.formatNumber('#.')},{dSmoothing.formatNumber('#.')})"
847858
})
848859

860+
r("LineSeries", ["supertrend"]).setAll({
861+
legendValueText: "",
862+
legendLabelText: "{shortName} ({period.formatNumber('#.')},{multiplier.formatNumber('#.')})"
863+
})
864+
849865
r("LineSeries", ["trix"]).setAll({
850866
legendValueText: "[{seriesColor} bold]{valueY.formatNumber('#.00')}[/] [{signalColor} bold]{signal.formatNumber('#.00')}[/]",
851867
legendLabelText: "{shortName} ({period.formatNumber('#.')})"
@@ -1143,6 +1159,15 @@ export class StockChartDefaultTheme extends Theme {
11431159
seriesColor: color(0xab82da)
11441160
})
11451161

1162+
r("SuperTrend").setAll({
1163+
name: l.translateAny("Super Trend"),
1164+
shortName: l.translateAny("Super Trend"),
1165+
period: 10,
1166+
upperColor: ic.get("negative"),
1167+
lowerColor: ic.get("positive"),
1168+
multiplier: 3
1169+
})
1170+
11461171
r("WilliamsR").setAll({
11471172
name: l.translateAny("Williams %R"),
11481173
shortName: l.translateAny("Williams %R"),
@@ -1278,7 +1303,7 @@ export class StockChartDefaultTheme extends Theme {
12781303
scrollable: true,
12791304
fixedLabel: true,
12801305
searchable: true,
1281-
indicators: ["Acceleration Bands", "Accumulation Distribution", "Accumulative Swing Index", "Aroon", "Average True Range", "Awesome Oscillator", "Bollinger Bands", "Bull Bear Power", "Chaikin Money Flow", "Chaikin Oscillator", "Commodity Channel Index", "Disparity Index", "Heikin Ashi", "MACD", "Median Price", "Momentum", "Moving Average", "Moving Average Cross", "Moving Average Deviation", "Moving Average Envelope", "On Balance Volume", "Price Volume Trend", "Relative Strength Index", "Standard Deviation", "Stochastic Momentum Index", "Stochastic Oscillator", "Trix", "Typical Price", "Volume", "Volume Profile", "VWAP", "Williams R", "ZigZag"]
1306+
indicators: ["Acceleration Bands", "Accumulation Distribution", "Accumulative Swing Index", "Aroon", "Average True Range", "Awesome Oscillator", "Bollinger Bands", "Bull Bear Power", "Chaikin Money Flow", "Chaikin Oscillator", "Commodity Channel Index", "Disparity Index", "Heikin Ashi", "MACD", "Median Price", "Momentum", "Moving Average", "Moving Average Cross", "Moving Average Deviation", "Moving Average Envelope", "On Balance Volume", "Price Volume Trend", "Relative Strength Index", "Standard Deviation", "Stochastic Momentum Index", "Stochastic Oscillator", "Super Trend", "Trix", "Typical Price", "Volume", "Volume Profile", "VWAP", "Williams R", "ZigZag"]
12821307
});
12831308

12841309
r("ComparisonControl").setAll({

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ export class DrawingSeries extends LineSeries {
185185
protected _afterNew() {
186186
this.addTag("drawing");
187187
this.setPrivate("allowChangeSnap", true);
188+
this.set("exactLocationX", true);
188189

189190
if (this._tag) {
190191
this.addTag(this._tag);

0 commit comments

Comments
 (0)