Skip to content

Commit

Permalink
Merge pull request #1685 from VisActor/fix/label-increaseCount
Browse files Browse the repository at this point in the history
fix: fix the issue where the final text of the label increase count  …
  • Loading branch information
xiaoluoHe authored Jan 16, 2025
2 parents a92c1b6 + e078e69 commit 7cdf6fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vrender-core",
"comment": "fix: fix the issue where the final text of the label increase count animation is incorrect",
"type": "none"
}
],
"packageName": "@visactor/vrender-core"
}
2 changes: 1 addition & 1 deletion packages/vrender-core/src/animate/custom-animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class IncreaseCount extends ACustomAnimate<{ text: string | number }> {
return;
}
if (end) {
out.text = this.toNumber;
out.text = this.to?.text;
} else {
out.text = (this.fromNumber + (this.toNumber - this.fromNumber) * ratio).toFixed(this.decimalLength);
}
Expand Down

0 comments on commit 7cdf6fd

Please sign in to comment.