Skip to content

Commit

Permalink
Version 5.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
martynasma committed Oct 11, 2024
1 parent 1700061 commit 683cdd3
Show file tree
Hide file tree
Showing 67 changed files with 777 additions and 427 deletions.
2 changes: 1 addition & 1 deletion examples/shared/map-animating-along-lines/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";


Expand Down
4 changes: 2 additions & 2 deletions examples/shared/map-clustered-points/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";


Expand Down Expand Up @@ -289,4 +289,4 @@ function addCity(longitude, latitude, title) {
}

// Make stuff animate on load
chart.appear(1000, 100);
chart.appear(1000, 100);
2 changes: 1 addition & 1 deletion examples/shared/map-day-and-night/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";

/**
Expand Down
4 changes: 2 additions & 2 deletions examples/shared/map-globe-rotate-to-country/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";


Expand Down Expand Up @@ -83,4 +83,4 @@ polygonSeries.mapPolygons.template.on("active", (active, target) => {


// Make stuff animate on load
chart.appear(1000, 100);
chart.appear(1000, 100);
4 changes: 2 additions & 2 deletions examples/shared/map-globe-with-projected-circles/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";


Expand Down Expand Up @@ -280,4 +280,4 @@ polygonSeries.events.on("datavalidated", () => {


// Make stuff animate on load
chart.appear(1000, 100);
chart.appear(1000, 100);
2 changes: 1 addition & 1 deletion examples/shared/map-with-bubbles/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";

/**
Expand Down
4 changes: 2 additions & 2 deletions examples/shared/map-zoom-to-country/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as am5 from "@amcharts/amcharts5";
import * as am5map from "@amcharts/amcharts5/map";
import am5geodata_worldLow from "@amcharts/amcharts5/geodata/worldLow";
import am5geodata_worldLow from "@amcharts/amcharts5-geodata/worldLow";
import am5themes_Animated from "@amcharts/amcharts5/themes/Animated";


Expand Down Expand Up @@ -74,4 +74,4 @@ chart.chartContainer.get("background").events.on("click", () => {


// Make stuff animate on load
chart.appear(1000, 100);
chart.appear(1000, 100);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@amcharts/amcharts5",
"version": "5.10.5",
"version": "5.10.6",
"author": "amCharts <[email protected]> (https://www.amcharts.com/)",
"description": "amCharts 5",
"homepage": "https://www.amcharts.com/",
Expand Down
23 changes: 23 additions & 0 deletions packages/shared/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,29 @@ 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.10.6] - 2024-10-11

### Added
- `hideDrawingGrips` setting (default: `false`) added to `StockChart`. If set to true, grips of drawings will be hidden when not in drawing mode.
- `toggleDrawing(enabled: boolean)` method added to `StockChart`. Toggles drawing mode on or off.
- `autoOpenSettings` setting (default: `true`) added to `Indicator`. If set to `false`, a settings modal will not pop up automatically when the indicator is added to chart via indicator control.

### Changed
- On `StockChart` labels and icons are no longer draggable to avoid interfering with chart drag/zoom.
- Arrow position slightly changed in "Line Arrow" drawing tool on `StockChart`. Grip at the end of the arrow removed.
- Arrow tip size will not increased to reflect the line thickness of a "Line Arrow".
- "Volume Profile" indicator had its full name hardcoded for legend. It will now use its `shortName` (which is "Volume Profile", too, by default but can be changed to anything else).
- `Modal` content will now have its contents aligned to `start`, rather than `left`, to properly handle RTL direction.

### Fixed
- "Line Arrow" drawing tool would not save its color when serialized.
- "Line Arrow" tip was not taking a color change.
- ES2025 examples involving `MapChart` were not correctly importing geodata.
- Using `clearDrawings()` was erroring if there was "Line Arrow" drawings added to `StockChart`.
- Rotated elements with HTML content were not being properly positioned in all cases.
- `scrollToChild` method of `Container` was not working properly.


## [5.10.5] - 2024-09-06

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/.internal/charts/flow/ArcDiagram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ export class ArcDiagram extends Flow {
*
* @default new ListTemplate<ArcDiagramLink>
*/
public readonly links: ListTemplate<ArcDiagramLink> = new ListTemplate(
public readonly links: ListTemplate<ArcDiagramLink> = this.addDisposer(new ListTemplate(
Template.new({}),
() => ArcDiagramLink._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template])
);
));

/**
* A series for all ArcDiagram nodes.
Expand Down
8 changes: 4 additions & 4 deletions src/.internal/charts/flow/ArcDiagramNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export class ArcDiagramNodes extends FlowNodes {
*
* @default new ListTemplate<Label>
*/
public readonly labels: ListTemplate<Label> = new ListTemplate(
public readonly labels: ListTemplate<Label> = this.addDisposer(new ListTemplate(
Template.new({}),
() => Label._new(this._root, {}, [this.labels.template])
);
));

declare public _settings: IArcDiagramNodesSettings;
declare public _privateSettings: IArcDiagramNodesPrivate;
Expand All @@ -61,10 +61,10 @@ export class ArcDiagramNodes extends FlowNodes {
*
* @default new ListTemplate<Slice>
*/
public readonly circles: ListTemplate<Circle> = new ListTemplate(
public readonly circles: ListTemplate<Circle> = this.addDisposer(new ListTemplate(
Template.new({}),
() => Circle._new(this._root, { themeTags: ["shape"] }, [this.circles.template])
);
));

/**
* @ignore
Expand Down
6 changes: 3 additions & 3 deletions src/.internal/charts/flow/Chord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ export class Chord extends Flow {
*
* @default new ListTemplate<ChordLink>
*/
public readonly links: ListTemplate<ChordLink> = new ListTemplate(
public readonly links: ListTemplate<ChordLink> = this.addDisposer(new ListTemplate(
Template.new({}),
() => ChordLink._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template])
);
));

/**
* A series for all chord nodes.
Expand Down Expand Up @@ -169,7 +169,7 @@ export class Chord extends Flow {
if(value < valueSum * minSize){
value = valueSum * minSize;
}
}
}
})
}

Expand Down
4 changes: 2 additions & 2 deletions src/.internal/charts/flow/ChordDirected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export class ChordDirected extends Chord {
*
* @default new ListTemplate<ChordLinkDirected>
*/
public readonly links: ListTemplate<ChordLinkDirected> = new ListTemplate(
public readonly links: ListTemplate<ChordLinkDirected> = this.addDisposer(new ListTemplate(
Template.new({}),
() => ChordLinkDirected._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template])
);
));
/**
* @ignore
*/
Expand Down
10 changes: 5 additions & 5 deletions src/.internal/charts/flow/ChordNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export class ChordNodes extends FlowNodes {
*
* @default new ListTemplate<RadialLabel>
*/
public readonly labels: ListTemplate<RadialLabel> = new ListTemplate(
public readonly labels: ListTemplate<RadialLabel> = this.addDisposer(new ListTemplate(
Template.new({}),
() => RadialLabel._new(this._root, {}, [this.labels.template])
);
));

declare public _settings: IChordNodesSettings;
declare public _privateSettings: IChordNodesPrivate;
Expand All @@ -68,10 +68,10 @@ export class ChordNodes extends FlowNodes {
*
* @default new ListTemplate<Slice>
*/
public readonly slices: ListTemplate<Slice> = new ListTemplate(
public readonly slices: ListTemplate<Slice> = this.addDisposer(new ListTemplate(
Template.new({}),
() => Slice._new(this._root, { themeTags: ["shape"] }, [this.slices.template])
);
));

/**
* @ignore
Expand Down Expand Up @@ -151,7 +151,7 @@ export class ChordNodes extends FlowNodes {
slice.set("fill", dataItem.get("fill"));
slice.set("fillPattern", dataItem.get("fillPattern"));
}
}
}

/**
* @ignore
Expand Down
8 changes: 4 additions & 4 deletions src/.internal/charts/flow/FlowNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,20 +182,20 @@ export abstract class FlowNodes extends Series {
*
* @default new ListTemplate<Label>
*/
public readonly labels: ListTemplate<Label> = new ListTemplate(
public readonly labels: ListTemplate<Label> = this.addDisposer(new ListTemplate(
Template.new({}),
() => Label._new(this._root, { themeTags: ["flow"] }, [this.labels.template])
);
));

/**
* List of node elements.
*
* @default new ListTemplate<FlowNode>
*/
public readonly nodes: ListTemplate<FlowNode> = new ListTemplate(
public readonly nodes: ListTemplate<FlowNode> = this.addDisposer(new ListTemplate(
Template.new({}),
() => FlowNode._new(this._root, { themeTags: ["node"] }, [this.nodes.template])
);
));

/**
* Related [[Flow]] series.
Expand Down
8 changes: 4 additions & 4 deletions src/.internal/charts/flow/Sankey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ export interface ISankeySettings extends IFlowSettings {

/**
* A custom function to use when sorting links.
*
*
* Use `null` to sort links exactly the way they are presented in data.
*
*
* @since 5.4.4
*/
linkSort?: null | ((a: d3sankey.SankeyLinkMinimal<{}, {}>, b: d3sankey.SankeyLinkMinimal<{}, {}>) => number | null);
Expand Down Expand Up @@ -103,10 +103,10 @@ export class Sankey extends Flow {
*
* @default new ListTemplate<SankeyLink>
*/
public readonly links: ListTemplate<SankeyLink> = new ListTemplate(
public readonly links: ListTemplate<SankeyLink> = this.addDisposer(new ListTemplate(
Template.new({}),
() => SankeyLink._new(this._root, { themeTags: ["link", "shape"] }, [this.links.template])
);
));

protected _afterNew() {
this._settings.themeTags = $utils.mergeTags(this._settings.themeTags, ["sankey", this._settings.orientation || "horizontal"]);
Expand Down
8 changes: 4 additions & 4 deletions src/.internal/charts/flow/SankeyNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export class SankeyNodes extends FlowNodes {
*
* @default new ListTemplate<RoundedRectangle>
*/
public readonly rectangles: ListTemplate<RoundedRectangle> = new ListTemplate(
public readonly rectangles: ListTemplate<RoundedRectangle> = this.addDisposer(new ListTemplate(
Template.new({}),
() => RoundedRectangle._new(this._root, { themeTags: ["shape"] }, [this.rectangles.template])
);
));

/**
* Related [[Sankey]] series.
Expand All @@ -60,7 +60,7 @@ export class SankeyNodes extends FlowNodes {
this.rectangles.push(rectangle);
rectangle._setSoft("fill", dataItem.get("fill"));
rectangle._setSoft("fillPattern", dataItem.get("fillPattern"));

dataItem.set("rectangle", rectangle);

node.events.on("dragged", () => {
Expand Down Expand Up @@ -133,5 +133,5 @@ export class SankeyNodes extends FlowNodes {
rectangle.set("fill", dataItem.get("fill"));
rectangle.set("fillPattern", dataItem.get("fillPattern"));
}
}
}
}
2 changes: 1 addition & 1 deletion src/.internal/charts/funnel/FunnelSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class FunnelSeries extends PercentSeries {
*
* @see {@link https://www.amcharts.com/docs/v5/charts/percent-charts/sliced-chart/funnel-series/#Slice_links} for more info
*/
public readonly links: ListTemplate<this["_sliceType"]> = this._makeLinks();
public readonly links: ListTemplate<this["_sliceType"]> = this.addDisposer(this._makeLinks());

protected _makeLinks(): ListTemplate<this["_sliceType"]> {
return new ListTemplate(
Expand Down
4 changes: 2 additions & 2 deletions src/.internal/charts/hierarchy/BreadcrumbBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ export class BreadcrumbBar extends Container {
*
* @default new ListTemplate<Label>
*/
public readonly labels: ListTemplate<Label> = new ListTemplate(
public readonly labels: ListTemplate<Label> = this.addDisposer(new ListTemplate(
Template.new({}),
() => Label._new(this._root, {
themeTags: $utils.mergeTags(this.labels.template.get("themeTags", []), ["label"]),
background: RoundedRectangle.new(this._root, {
themeTags: ["background"]
})
}, [this.labels.template])
);
));

public static className: string = "BreadcrumbBar";
public static classNames: Array<string> = Container.classNames.concat([BreadcrumbBar.className]);
Expand Down
14 changes: 7 additions & 7 deletions src/.internal/charts/hierarchy/Hierarchy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ export abstract class Hierarchy extends Series {
*
* @default new ListTemplate<HierarchyNode>
*/
public readonly nodes: ListTemplate<HierarchyNode> = new ListTemplate(
public readonly nodes: ListTemplate<HierarchyNode> = this.addDisposer(new ListTemplate(
Template.new({}),
() => HierarchyNode.new(this._root, {
themeTags: $utils.mergeTags(this.nodes.template.get("themeTags", []), [this._tag, "hierarchy", "node"])
}, this.nodes.template)
);
));

/**
* @ignore
Expand Down Expand Up @@ -319,12 +319,12 @@ export abstract class Hierarchy extends Series {
*
* @default new ListTemplate<Label>
*/
public readonly labels: ListTemplate<Label> = new ListTemplate(
public readonly labels: ListTemplate<Label> = this.addDisposer(new ListTemplate(
Template.new({}),
() => Label.new(this._root, {
themeTags: $utils.mergeTags(this.labels.template.get("themeTags", []), [this._tag])
}, this.labels.template)
);
));

public _currentDownDepth: number | undefined;

Expand Down Expand Up @@ -819,7 +819,7 @@ export abstract class Hierarchy extends Series {
dataItem.get("node").show(duration);
}



const topDepth = this.get("topDepth", 0);
if (dataItem.get("depth") < topDepth) {
Expand All @@ -842,7 +842,7 @@ export abstract class Hierarchy extends Series {

let children = dataItem.get("children");
if (children) {
if (depth < maxDepth - 1) {
if (depth < maxDepth - 1) {
$array.each(children, (child) => {
const disabledField = this.get("disabledField");
if (disabledField) {
Expand Down Expand Up @@ -904,7 +904,7 @@ export abstract class Hierarchy extends Series {
downDepth = Math.min(this.get("downDepth", 1), maxDepth - dataItem.get("depth"));
}

const hierarchyNode = dataItem.get("d3HierarchyNode");
const hierarchyNode = dataItem.get("d3HierarchyNode");
let currentDepth = hierarchyNode.depth;
if (!this.inited) {
downDepth = Math.min(this.get("initialDepth", 1), maxDepth - topDepth);
Expand Down
Loading

0 comments on commit 683cdd3

Please sign in to comment.