Skip to content

Commit

Permalink
Version 5.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
martynasma committed Nov 9, 2021
1 parent 2e67682 commit 9863836
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
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.0.2",
"version": "5.0.3",
"author": "amCharts <contact@amcharts.com> (https://www.amcharts.com/)",
"description": "amCharts 5",
"homepage": "https://www.amcharts.com/",
Expand Down
6 changes: 6 additions & 0 deletions packages/shared/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ 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.0.3] - 2021-11-09

### Fixed
- Incorrect sizing of a label in a central `Sunburst` node.


## [5.0.2] - 2021-11-09

### Added
Expand Down
6 changes: 4 additions & 2 deletions src/.internal/charts/hierarchy/Sunburst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ export class Sunburst extends Partition {
let arc = Math.abs(slice.get("arc", 0));
let labelAngle = angle + arc / 2;

let maxWidth = radius - innerRadius;
let maxHeight = radius * arc * $math.RADIANS;

if (innerRadius == 0 && arc >= 360) {
radius = 1;
labelAngle = 0;
Expand All @@ -352,8 +355,7 @@ export class Sunburst extends Partition {
label.setPrivate("radius", radius);
label.setPrivate("innerRadius", innerRadius);

let maxWidth = radius - innerRadius;
let maxHeight = radius * arc * $math.RADIANS;

if (arc >= 360) {
maxWidth *= 2;
maxHeight = maxWidth;
Expand Down
11 changes: 11 additions & 0 deletions src/.internal/core/render/Sprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,17 @@ export abstract class Sprite extends Entity {
/**
* A [[DataItem]] used for this element.
*
* NOTE: data item is being assigned automatically in most cases where it
* matters. Use this accessor to set data item only if you know what you're
* doing.
*
* @param value Data item
*/
public set dataItem(value: DataItem<IComponentDataItem> | undefined) {
this._setDataItem(value);
}

/**
* @return DataItem
*/
public get dataItem(): DataItem<IComponentDataItem> | undefined {
Expand Down

0 comments on commit 9863836

Please sign in to comment.