From dfbc80e7798d75d2faac57078b1ce33cd0e6ed4d Mon Sep 17 00:00:00 2001 From: martynasma Date: Fri, 5 Jan 2024 13:13:47 +0200 Subject: [PATCH] Version 5.7.6 --- package.json | 2 +- packages/shared/CHANGELOG.md | 8 ++++++++ src/.internal/charts/stock/indicators/MACross.ts | 5 +++++ .../charts/stock/toolbar/DataSaveControl.ts | 5 ++++- src/.internal/core/Classes.ts | 12 ++++++------ src/.internal/core/Registry.ts | 2 +- src/.internal/plugins/json/Classes-script.ts | 12 ++++++++++++ src/.internal/plugins/json/Classes.ts | 12 ++++++++++++ src/stock.ts | 1 + 9 files changed, 50 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index d9ba6f5a..15d22ff3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@amcharts/amcharts5", - "version": "5.7.5", + "version": "5.7.6", "author": "amCharts (https://www.amcharts.com/)", "description": "amCharts 5", "homepage": "https://www.amcharts.com/", diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index dd754e92..e6d2c817 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). Please note, that this project, while following numbering syntax, it DOES NOT adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules. +## [5.7.6] - 2024-01-05 + +### Fixed +- One of the underlying series was not being removed when disposing MACross indicator. +- Some of the newer indicators were not being restored. +- `autoSave: true` set on `DataSaveControl` was not working. + + ## [5.7.5] - 2024-01-04 ### Added diff --git a/src/.internal/charts/stock/indicators/MACross.ts b/src/.internal/charts/stock/indicators/MACross.ts index b7b9f522..eebb06cd 100644 --- a/src/.internal/charts/stock/indicators/MACross.ts +++ b/src/.internal/charts/stock/indicators/MACross.ts @@ -73,6 +73,11 @@ export class MACross extends Indicator { super._prepareChildren(); } + protected _dispose() { + this.fastSeries.dispose(); + super._dispose(); + } + protected _afterNew() { super._afterNew(); diff --git a/src/.internal/charts/stock/toolbar/DataSaveControl.ts b/src/.internal/charts/stock/toolbar/DataSaveControl.ts index 11c9e057..89f29a56 100644 --- a/src/.internal/charts/stock/toolbar/DataSaveControl.ts +++ b/src/.internal/charts/stock/toolbar/DataSaveControl.ts @@ -97,6 +97,9 @@ export class DataSaveControl extends DropdownListControl { if (ev.item.id == "autosave") { const autoSave = !ev.item.checked; this.set("autoSave", autoSave); + if (autoSave) { + this.saveData(); + } } }); @@ -138,7 +141,7 @@ export class DataSaveControl extends DropdownListControl { const autoSave = this.get("autoSave", false); if (autoSave) { localStorage.setItem(this._getStorageId("autosave"), "1"); - this.saveData(); + //this.saveData(); } else { localStorage.removeItem(this._getStorageId("autosave")); diff --git a/src/.internal/core/Classes.ts b/src/.internal/core/Classes.ts index f640a77b..de4d3b26 100644 --- a/src/.internal/core/Classes.ts +++ b/src/.internal/core/Classes.ts @@ -3,6 +3,7 @@ * DO NOT MANUALLY EDIT IT OR YOUR CHANGES WILL BE LOST! */ +import type { AccelerationBands } from "./../charts/stock/indicators/AccelerationBands.js"; import type { AccumulationDistribution } from "./../charts/stock/indicators/AccumulationDistribution.js"; import type { AccumulativeSwingIndex } from "./../charts/stock/indicators/AccumulativeSwingIndex.js"; import type { Annotator } from "./../plugins/exporting/Annotator.js"; @@ -24,10 +25,9 @@ import type { AxisRendererY } from "./../charts/xy/axes/AxisRendererY.js"; import type { AxisTick } from "./../charts/xy/axes/AxisTick.js"; import type { BaseColumnSeries } from "./../charts/xy/series/BaseColumnSeries.js"; import type { BollingerBands } from "./../charts/stock/indicators/BollingerBands.js"; -import type { AccelerationBands } from "./../charts/stock/indicators/AccelerationBands.js"; import type { BreadcrumbBar } from "./../charts/hierarchy/BreadcrumbBar.js"; -import type { Bullet } from "./render/Bullet.js"; import type { BullBearPower } from "./../charts/stock/indicators/BullBearPower.js"; +import type { Bullet } from "./render/Bullet.js"; import type { Button } from "./render/Button.js"; import type { CalloutSeries } from "./../charts/stock/drawing/CalloutSeries.js"; import type { Candlestick } from "./../charts/xy/series/Candlestick.js"; @@ -133,6 +133,7 @@ import type { OHLC } from "./../charts/xy/series/OHLC.js"; import type { OHLCSeries } from "./../charts/xy/series/OHLCSeries.js"; import type { OnBalanceVolume } from "./../charts/stock/indicators/OnBalanceVolume.js"; import type { OverboughtOversold } from "./../charts/stock/indicators/OverboughtOversold.js"; +import type { PVT } from "./../charts/stock/indicators/PVT.js"; import type { Pack } from "./../charts/hierarchy/Pack.js"; import type { PanelControls } from "./../charts/stock/PanelControls.js"; import type { ParallelChannelSeries } from "./../charts/stock/drawing/ParallelChannelSeries.js"; @@ -151,7 +152,6 @@ import type { PointedRectangle } from "./render/PointedRectangle.js"; import type { Polygon } from "./render/Polygon.js"; import type { PolylineSeries } from "./../charts/stock/drawing/PolylineSeries.js"; import type { PyramidSeries } from "./../charts/funnel/PyramidSeries.js"; -import type { PVT } from "./../charts/stock/indicators/PVT.js"; import type { QuadrantLineSeries } from "./../charts/stock/drawing/QuadrantLineSeries.js"; import type { RadarChart } from "./../charts/radar/RadarChart.js"; import type { RadarColumnSeries } from "./../charts/radar/RadarColumnSeries.js"; @@ -226,6 +226,7 @@ import type { ZigZag } from "./../charts/stock/indicators/ZigZag.js"; import type { ZoomControl } from "./../charts/map/ZoomControl.js"; export interface IClasses { + "AccelerationBands": AccelerationBands; "AccumulationDistribution": AccumulationDistribution; "AccumulativeSwingIndex": AccumulativeSwingIndex; "Annotator": Annotator; @@ -247,9 +248,8 @@ export interface IClasses { "AxisTick": AxisTick; "BaseColumnSeries": BaseColumnSeries; "BollingerBands": BollingerBands; - "BullBearPower": BullBearPower; - "AccelerationBands": AccelerationBands; "BreadcrumbBar": BreadcrumbBar; + "BullBearPower": BullBearPower; "Bullet": Bullet; "Button": Button; "CalloutSeries": CalloutSeries; @@ -356,6 +356,7 @@ export interface IClasses { "OHLCSeries": OHLCSeries; "OnBalanceVolume": OnBalanceVolume; "OverboughtOversold": OverboughtOversold; + "PVT": PVT; "Pack": Pack; "PanelControls": PanelControls; "ParallelChannelSeries": ParallelChannelSeries; @@ -374,7 +375,6 @@ export interface IClasses { "Polygon": Polygon; "PolylineSeries": PolylineSeries; "PyramidSeries": PyramidSeries; - "PVT": PVT; "QuadrantLineSeries": QuadrantLineSeries; "RadarChart": RadarChart; "RadarColumnSeries": RadarColumnSeries; diff --git a/src/.internal/core/Registry.ts b/src/.internal/core/Registry.ts index 8ba9d4a3..21856e4b 100644 --- a/src/.internal/core/Registry.ts +++ b/src/.internal/core/Registry.ts @@ -6,7 +6,7 @@ export class Registry { /** * Currently running version of amCharts. */ - readonly version: string = "5.7.5"; + readonly version: string = "5.7.6"; /** * List of applied licenses. diff --git a/src/.internal/plugins/json/Classes-script.ts b/src/.internal/plugins/json/Classes-script.ts index 9c500905..ed26cfc1 100644 --- a/src/.internal/plugins/json/Classes-script.ts +++ b/src/.internal/plugins/json/Classes-script.ts @@ -3,6 +3,7 @@ * DO NOT MANUALLY EDIT IT OR YOUR CHANGES WILL BE LOST! */ +import type { AccelerationBands } from "./../../../stock"; import type { AccumulationDistribution } from "./../../../stock"; import type { AccumulativeSwingIndex } from "./../../../stock"; import type { Annotator } from "./../../../plugins/exporting"; @@ -25,6 +26,7 @@ import type { AxisTick } from "./../../../xy"; import type { BaseColumnSeries } from "./../../../xy"; import type { BollingerBands } from "./../../../stock"; import type { BreadcrumbBar } from "./../../../hierarchy"; +import type { BullBearPower } from "./../../../stock"; import type { Bullet } from "./../../../index"; import type { Button } from "./../../../index"; import type { CalloutSeries } from "./../../../stock"; @@ -112,6 +114,7 @@ import type { LinearGradient } from "./../../../index"; import type { LinkedHierarchy } from "./../../../hierarchy"; import type { LinkedHierarchyNode } from "./../../../hierarchy"; import type { MACD } from "./../../../stock"; +import type { MACross } from "./../../../stock"; import type { MapChart } from "./../../../map"; import type { MapLine } from "./../../../map"; import type { MapLineSeries } from "./../../../map"; @@ -130,6 +133,7 @@ import type { OHLC } from "./../../../xy"; import type { OHLCSeries } from "./../../../xy"; import type { OnBalanceVolume } from "./../../../stock"; import type { OverboughtOversold } from "./../../../stock"; +import type { PVT } from "./../../../stock"; import type { Pack } from "./../../../hierarchy"; import type { PanelControls } from "./../../../stock"; import type { ParallelChannelSeries } from "./../../../stock"; @@ -222,6 +226,7 @@ import type { ZigZag } from "./../../../stock"; import type { ZoomControl } from "./../../../map"; export interface IClasses { + "AccelerationBands": () => Promise; "AccumulationDistribution": () => Promise; "AccumulativeSwingIndex": () => Promise; "Annotator": () => Promise; @@ -244,6 +249,7 @@ export interface IClasses { "BaseColumnSeries": () => Promise; "BollingerBands": () => Promise; "BreadcrumbBar": () => Promise; + "BullBearPower": () => Promise; "Bullet": () => Promise; "Button": () => Promise; "CalloutSeries": () => Promise; @@ -331,6 +337,7 @@ export interface IClasses { "LinkedHierarchy": () => Promise; "LinkedHierarchyNode": () => Promise; "MACD": () => Promise; + "MACross": () => Promise; "MapChart": () => Promise; "MapLine": () => Promise; "MapLineSeries": () => Promise; @@ -349,6 +356,7 @@ export interface IClasses { "OHLCSeries": () => Promise; "OnBalanceVolume": () => Promise; "OverboughtOversold": () => Promise; + "PVT": () => Promise; "Pack": () => Promise; "PanelControls": () => Promise; "ParallelChannelSeries": () => Promise; @@ -442,6 +450,7 @@ export interface IClasses { } const classes: IClasses = { + "AccelerationBands": () => import(/* webpackExports: "AccelerationBands", webpackMode: "weak" */ "./../../../stock").then((m) => m.AccelerationBands), "AccumulationDistribution": () => import(/* webpackExports: "AccumulationDistribution", webpackMode: "weak" */ "./../../../stock").then((m) => m.AccumulationDistribution), "AccumulativeSwingIndex": () => import(/* webpackExports: "AccumulativeSwingIndex", webpackMode: "weak" */ "./../../../stock").then((m) => m.AccumulativeSwingIndex), "Annotator": () => import(/* webpackExports: "Annotator", webpackMode: "weak" */ "./../../../plugins/exporting").then((m) => m.Annotator), @@ -464,6 +473,7 @@ const classes: IClasses = { "BaseColumnSeries": () => import(/* webpackExports: "BaseColumnSeries", webpackMode: "weak" */ "./../../../xy").then((m) => m.BaseColumnSeries), "BollingerBands": () => import(/* webpackExports: "BollingerBands", webpackMode: "weak" */ "./../../../stock").then((m) => m.BollingerBands), "BreadcrumbBar": () => import(/* webpackExports: "BreadcrumbBar", webpackMode: "weak" */ "./../../../hierarchy").then((m) => m.BreadcrumbBar), + "BullBearPower": () => import(/* webpackExports: "BullBearPower", webpackMode: "weak" */ "./../../../stock").then((m) => m.BullBearPower), "Bullet": () => import(/* webpackExports: "Bullet", webpackMode: "weak" */ "./../../../index").then((m) => m.Bullet), "Button": () => import(/* webpackExports: "Button", webpackMode: "weak" */ "./../../../index").then((m) => m.Button), "CalloutSeries": () => import(/* webpackExports: "CalloutSeries", webpackMode: "weak" */ "./../../../stock").then((m) => m.CalloutSeries), @@ -551,6 +561,7 @@ const classes: IClasses = { "LinkedHierarchy": () => import(/* webpackExports: "LinkedHierarchy", webpackMode: "weak" */ "./../../../hierarchy").then((m) => m.LinkedHierarchy), "LinkedHierarchyNode": () => import(/* webpackExports: "LinkedHierarchyNode", webpackMode: "weak" */ "./../../../hierarchy").then((m) => m.LinkedHierarchyNode), "MACD": () => import(/* webpackExports: "MACD", webpackMode: "weak" */ "./../../../stock").then((m) => m.MACD), + "MACross": () => import(/* webpackExports: "MACross", webpackMode: "weak" */ "./../../../stock").then((m) => m.MACross), "MapChart": () => import(/* webpackExports: "MapChart", webpackMode: "weak" */ "./../../../map").then((m) => m.MapChart), "MapLine": () => import(/* webpackExports: "MapLine", webpackMode: "weak" */ "./../../../map").then((m) => m.MapLine), "MapLineSeries": () => import(/* webpackExports: "MapLineSeries", webpackMode: "weak" */ "./../../../map").then((m) => m.MapLineSeries), @@ -569,6 +580,7 @@ const classes: IClasses = { "OHLCSeries": () => import(/* webpackExports: "OHLCSeries", webpackMode: "weak" */ "./../../../xy").then((m) => m.OHLCSeries), "OnBalanceVolume": () => import(/* webpackExports: "OnBalanceVolume", webpackMode: "weak" */ "./../../../stock").then((m) => m.OnBalanceVolume), "OverboughtOversold": () => import(/* webpackExports: "OverboughtOversold", webpackMode: "weak" */ "./../../../stock").then((m) => m.OverboughtOversold), + "PVT": () => import(/* webpackExports: "PVT", webpackMode: "weak" */ "./../../../stock").then((m) => m.PVT), "Pack": () => import(/* webpackExports: "Pack", webpackMode: "weak" */ "./../../../hierarchy").then((m) => m.Pack), "PanelControls": () => import(/* webpackExports: "PanelControls", webpackMode: "weak" */ "./../../../stock").then((m) => m.PanelControls), "ParallelChannelSeries": () => import(/* webpackExports: "ParallelChannelSeries", webpackMode: "weak" */ "./../../../stock").then((m) => m.ParallelChannelSeries), diff --git a/src/.internal/plugins/json/Classes.ts b/src/.internal/plugins/json/Classes.ts index e8dd37e6..76fdafa6 100644 --- a/src/.internal/plugins/json/Classes.ts +++ b/src/.internal/plugins/json/Classes.ts @@ -3,6 +3,7 @@ * DO NOT MANUALLY EDIT IT OR YOUR CHANGES WILL BE LOST! */ +import type { AccelerationBands } from "./../../../stock"; import type { AccumulationDistribution } from "./../../../stock"; import type { AccumulativeSwingIndex } from "./../../../stock"; import type { Annotator } from "./../../../plugins/exporting"; @@ -25,6 +26,7 @@ import type { AxisTick } from "./../../../xy"; import type { BaseColumnSeries } from "./../../../xy"; import type { BollingerBands } from "./../../../stock"; import type { BreadcrumbBar } from "./../../../hierarchy"; +import type { BullBearPower } from "./../../../stock"; import type { Bullet } from "./../../../index"; import type { Button } from "./../../../index"; import type { CalloutSeries } from "./../../../stock"; @@ -112,6 +114,7 @@ import type { LinearGradient } from "./../../../index"; import type { LinkedHierarchy } from "./../../../hierarchy"; import type { LinkedHierarchyNode } from "./../../../hierarchy"; import type { MACD } from "./../../../stock"; +import type { MACross } from "./../../../stock"; import type { MapChart } from "./../../../map"; import type { MapLine } from "./../../../map"; import type { MapLineSeries } from "./../../../map"; @@ -130,6 +133,7 @@ import type { OHLC } from "./../../../xy"; import type { OHLCSeries } from "./../../../xy"; import type { OnBalanceVolume } from "./../../../stock"; import type { OverboughtOversold } from "./../../../stock"; +import type { PVT } from "./../../../stock"; import type { Pack } from "./../../../hierarchy"; import type { PanelControls } from "./../../../stock"; import type { ParallelChannelSeries } from "./../../../stock"; @@ -222,6 +226,7 @@ import type { ZigZag } from "./../../../stock"; import type { ZoomControl } from "./../../../map"; export interface IClasses { + "AccelerationBands": () => Promise; "AccumulationDistribution": () => Promise; "AccumulativeSwingIndex": () => Promise; "Annotator": () => Promise; @@ -244,6 +249,7 @@ export interface IClasses { "BaseColumnSeries": () => Promise; "BollingerBands": () => Promise; "BreadcrumbBar": () => Promise; + "BullBearPower": () => Promise; "Bullet": () => Promise; "Button": () => Promise; "CalloutSeries": () => Promise; @@ -331,6 +337,7 @@ export interface IClasses { "LinkedHierarchy": () => Promise; "LinkedHierarchyNode": () => Promise; "MACD": () => Promise; + "MACross": () => Promise; "MapChart": () => Promise; "MapLine": () => Promise; "MapLineSeries": () => Promise; @@ -349,6 +356,7 @@ export interface IClasses { "OHLCSeries": () => Promise; "OnBalanceVolume": () => Promise; "OverboughtOversold": () => Promise; + "PVT": () => Promise; "Pack": () => Promise; "PanelControls": () => Promise; "ParallelChannelSeries": () => Promise; @@ -442,6 +450,7 @@ export interface IClasses { } const classes: IClasses = { + "AccelerationBands": () => import(/* webpackExports: "AccelerationBands", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.AccelerationBands), "AccumulationDistribution": () => import(/* webpackExports: "AccumulationDistribution", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.AccumulationDistribution), "AccumulativeSwingIndex": () => import(/* webpackExports: "AccumulativeSwingIndex", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.AccumulativeSwingIndex), "Annotator": () => import(/* webpackExports: "Annotator", webpackChunkName: "json_plugins_exporting" */ "./../../../plugins/exporting").then((m) => m.Annotator), @@ -464,6 +473,7 @@ const classes: IClasses = { "BaseColumnSeries": () => import(/* webpackExports: "BaseColumnSeries", webpackChunkName: "json_xy" */ "./../../../xy").then((m) => m.BaseColumnSeries), "BollingerBands": () => import(/* webpackExports: "BollingerBands", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.BollingerBands), "BreadcrumbBar": () => import(/* webpackExports: "BreadcrumbBar", webpackChunkName: "json_hierarchy" */ "./../../../hierarchy").then((m) => m.BreadcrumbBar), + "BullBearPower": () => import(/* webpackExports: "BullBearPower", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.BullBearPower), "Bullet": () => import(/* webpackExports: "Bullet", webpackChunkName: "json_index" */ "./../../../index").then((m) => m.Bullet), "Button": () => import(/* webpackExports: "Button", webpackChunkName: "json_index" */ "./../../../index").then((m) => m.Button), "CalloutSeries": () => import(/* webpackExports: "CalloutSeries", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.CalloutSeries), @@ -551,6 +561,7 @@ const classes: IClasses = { "LinkedHierarchy": () => import(/* webpackExports: "LinkedHierarchy", webpackChunkName: "json_hierarchy" */ "./../../../hierarchy").then((m) => m.LinkedHierarchy), "LinkedHierarchyNode": () => import(/* webpackExports: "LinkedHierarchyNode", webpackChunkName: "json_hierarchy" */ "./../../../hierarchy").then((m) => m.LinkedHierarchyNode), "MACD": () => import(/* webpackExports: "MACD", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.MACD), + "MACross": () => import(/* webpackExports: "MACross", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.MACross), "MapChart": () => import(/* webpackExports: "MapChart", webpackChunkName: "json_map" */ "./../../../map").then((m) => m.MapChart), "MapLine": () => import(/* webpackExports: "MapLine", webpackChunkName: "json_map" */ "./../../../map").then((m) => m.MapLine), "MapLineSeries": () => import(/* webpackExports: "MapLineSeries", webpackChunkName: "json_map" */ "./../../../map").then((m) => m.MapLineSeries), @@ -569,6 +580,7 @@ const classes: IClasses = { "OHLCSeries": () => import(/* webpackExports: "OHLCSeries", webpackChunkName: "json_xy" */ "./../../../xy").then((m) => m.OHLCSeries), "OnBalanceVolume": () => import(/* webpackExports: "OnBalanceVolume", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.OnBalanceVolume), "OverboughtOversold": () => import(/* webpackExports: "OverboughtOversold", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.OverboughtOversold), + "PVT": () => import(/* webpackExports: "PVT", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.PVT), "Pack": () => import(/* webpackExports: "Pack", webpackChunkName: "json_hierarchy" */ "./../../../hierarchy").then((m) => m.Pack), "PanelControls": () => import(/* webpackExports: "PanelControls", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.PanelControls), "ParallelChannelSeries": () => import(/* webpackExports: "ParallelChannelSeries", webpackChunkName: "json_stock" */ "./../../../stock").then((m) => m.ParallelChannelSeries), diff --git a/src/stock.ts b/src/stock.ts index a7587528..381f95d4 100644 --- a/src/stock.ts +++ b/src/stock.ts @@ -19,6 +19,7 @@ export { AccumulationDistribution, IAccumulationDistributionEvents, IAccumulatio export { AccumulativeSwingIndex, IAccumulativeSwingIndexEvents, IAccumulativeSwingIndexPrivate, IAccumulativeSwingIndexSettings } from "./.internal/charts/stock/indicators/AccumulativeSwingIndex"; export { Aroon, IAroonSettings, IAroonEvents, IAroonPrivate } from "./.internal/charts/stock/indicators/Aroon"; export { MACD, IMACDEvents, IMACDPrivate, IMACDSettings } from "./.internal/charts/stock/indicators/MACD"; +export { MACross, IMACrossEvents, IMACrossPrivate, IMACrossSettings } from "./.internal/charts/stock/indicators/MACross"; export { ChaikinMoneyFlow, IChaikinMoneyFlowEvents, IChaikinMoneyFlowPrivate, IChaikinMoneyFlowSettings } from "./.internal/charts/stock/indicators/ChaikinMoneyFlow"; export { ChaikinOscillator, IChaikinOscillatorEvents, IChaikinOscillatorPrivate, IChaikinOscillatorSettings } from "./.internal/charts/stock/indicators/ChaikinOscillator"; export { BullBearPower, IBullBearPowerEvents, IBullBearPowerPrivate, IBullBearPowerSettings } from "./.internal/charts/stock/indicators/BullBearPower";