Skip to content

Commit

Permalink
(fix): Do not regenerate mask ID on each update for percent gauge cha…
Browse files Browse the repository at this point in the history
…rt (#2022)

* (fix): Do not regenerate mask ID on each update for percent gauge chart

* Bump version
  • Loading branch information
marjan-georgiev authored Jan 24, 2025
1 parent 47a4f57 commit 9f94397
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 21.1.3

- Fix: Fixed a bug where the mask ID for percent gauge chart would be regenerated on each update

## 21.1.2

- Fix: Percent Gauge Chart: Ensures the circle mask ID is unique for each chart
Expand Down
2 changes: 1 addition & 1 deletion projects/swimlane/ngx-charts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swimlane/ngx-charts",
"version": "21.1.2",
"version": "21.1.3",
"description": "Declarative Charting Framework for Angular",
"repository": {
"type": "git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class PercentGaugeComponent extends BaseChartComponent {
targetRadius: number;
targetTextTransform: string;

circleMaskId: string;
circleMaskId = `circleMask${id()}`;
circleTransform: string;
ticks: any[] = [];
ticHeight: number;
Expand All @@ -144,8 +144,6 @@ export class PercentGaugeComponent extends BaseChartComponent {
update(): void {
super.update();

this.circleMaskId = `circleMask${id()}`;

this.margin = [...this.defaultMargin];
if (this.showLabel) {
this.margin[2] = 50;
Expand Down

0 comments on commit 9f94397

Please sign in to comment.