Skip to content

Commit

Permalink
Version 4.10.31
Browse files Browse the repository at this point in the history
  • Loading branch information
martynasma committed Dec 13, 2022
1 parent 584e1af commit 1ed95fb
Show file tree
Hide file tree
Showing 20 changed files with 93 additions and 36 deletions.
7 changes: 7 additions & 0 deletions dist/ember/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.

## [4.10.31] - 2022-12-13

### Fixed
- When exporting chart with external elements (e.g. external legend), export would leave some stray canvas elements in the DOM.
- `PieSeries`'s labels were arranged incorrectly in some cases, if `maxWidth` and `wrap` was set on the label template.


## [4.10.30] - 2022-11-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion dist/ember/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amcharts/amcharts4-ember",
"version": "4.10.30",
"version": "4.10.31",
"description": "Ember add-on for amCharts 4",
"keywords": [
"ember-addon",
Expand Down
7 changes: 7 additions & 0 deletions dist/ember/vendor/script/amcharts4/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.

## [4.10.31] - 2022-12-13

### Fixed
- When exporting chart with external elements (e.g. external legend), export would leave some stray canvas elements in the DOM.
- `PieSeries`'s labels were arranged incorrectly in some cases, if `maxWidth` and `wrap` was set on the label template.


## [4.10.30] - 2022-11-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion dist/ember/vendor/script/amcharts4/core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ember/vendor/script/amcharts4/core.js.map

Large diffs are not rendered by default.

29 changes: 20 additions & 9 deletions dist/es2015/.internal/charts/series/PercentSeries.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/es2015/.internal/charts/series/PercentSeries.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/es2015/.internal/core/System.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/es2015/.internal/core/System.js.map

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions dist/es2015/.internal/core/export/Export.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/es2015/.internal/core/export/Export.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions dist/es2015/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.

## [4.10.31] - 2022-12-13

### Fixed
- When exporting chart with external elements (e.g. external legend), export would leave some stray canvas elements in the DOM.
- `PieSeries`'s labels were arranged incorrectly in some cases, if `maxWidth` and `wrap` was set on the label template.


## [4.10.30] - 2022-11-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion dist/es2015/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amcharts/amcharts4",
"version": "4.10.30",
"version": "4.10.31",
"author": "amCharts <[email protected]> (https://www.amcharts.com/)",
"description": "amCharts 4",
"homepage": "https://www.amcharts.com/",
Expand Down
7 changes: 7 additions & 0 deletions dist/script/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ 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.

## [4.10.31] - 2022-12-13

### Fixed
- When exporting chart with external elements (e.g. external legend), export would leave some stray canvas elements in the DOM.
- `PieSeries`'s labels were arranged incorrectly in some cases, if `maxWidth` and `wrap` was set on the label template.


## [4.10.30] - 2022-11-14

### Changed
Expand Down
2 changes: 1 addition & 1 deletion dist/script/core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/script/core.js.map

Large diffs are not rendered by default.

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/amcharts4",
"version": "4.10.30",
"version": "4.10.31",
"repository": {
"type": "git",
"url": "https://github.com/amcharts/amcharts4.git"
Expand Down
38 changes: 26 additions & 12 deletions src/.internal/charts/series/PercentSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ export class PercentSeries extends Series {
if (label.invalid) {
label.validate();
}

let lh = label.measuredHeight;
if (!label.visible) {
lh = 0;
Expand All @@ -840,11 +840,25 @@ export class PercentSeries extends Series {

let nextLabel = this.getNextLabel(i + 1, dataItems);

let bottom: number = label.pixelY + lh;
let bottom: number = label.pixelY + lh / 2;

if (nextLabel) {
if (nextLabel.y < bottom) {
nextLabel.y = bottom;
if (nextLabel.invalid) {
nextLabel.validate();
}

let nextLabelHeight = nextLabel.measuredHeight;
if (!nextLabel.visible) {
nextLabelHeight = 0;
}

let nextLabelY = nextLabel.pixelY;
if (nextLabelY == null) {
nextLabelY = 0;
}

if (nextLabelY - nextLabelHeight / 2 < bottom) {
nextLabel.y = bottom + nextLabelHeight / 2;
}
}
}
Expand All @@ -871,13 +885,13 @@ export class PercentSeries extends Series {
lh = 0;
}

if (i == dataItems.length - 1) {
previousTop += lh / 2;
}
//if (i == dataItems.length - 1) {
//previousTop += lh / 2;
//}

if (label.pixelY + lh > previousTop) {
label.y = previousTop - lh;
previousTop = label.y;
if (label.pixelY + lh / 2 > previousTop) {
label.y = previousTop - lh / 2;
previousTop = label.y - lh / 2;
}
}
}
Expand Down Expand Up @@ -999,7 +1013,7 @@ export class PercentSeries extends Series {
if (!child.isActive) {
child.strokeOpacity = slice.strokeOpacity;
}
child.defaultState.properties.strokeOpacity = slice.strokeOpacity;
child.defaultState.properties.strokeOpacity = slice.strokeOpacity;
}
}, undefined, false));
});
Expand All @@ -1014,7 +1028,7 @@ export class PercentSeries extends Series {
protected handleSliceScale(event: AMEvent<this["_slice"], ISpriteEvents>["propertychanged"]): void {
let slice: this["_slice"] = event.target;
let dataItem: this["_dataItem"] = <this["_dataItem"]>slice.dataItem;
if(dataItem && dataItem.bullets){
if (dataItem && dataItem.bullets) {
$iter.each(dataItem.bullets.iterator(), (a) => {
let value = a[1];
this.positionBullet(value);
Expand Down
2 changes: 1 addition & 1 deletion src/.internal/core/System.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class System {
*
* @see {@link https://docs.npmjs.com/misc/semver}
*/
static VERSION: string = "4.10.30";
static VERSION: string = "4.10.31";

/**
* @todo Description
Expand Down
4 changes: 3 additions & 1 deletion src/.internal/core/export/Export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,9 @@ export class Export extends Validatable {

// Add extra sprites
if (includeExtras !== false) {
canvas = await this.addExtras(canvas, options);
const newCanvas = await this.addExtras(canvas, options);
this.disposeCanvas(canvas);
canvas = newCanvas;
}

// Convert to data uri
Expand Down

0 comments on commit 1ed95fb

Please sign in to comment.