Skip to content

Commit 09aff3e

Browse files
authored
fix(Axis): Fix memory leak and improve performance when tick values are Date instances (#586)
1 parent 08348a1 commit 09aff3e

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/old-lions-hide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'layerchart': patch
3+
---
4+
5+
fix(Axis): Fix memory leak and improve performance when tick values are `Date` instances

packages/layerchart/src/lib/components/Axis.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
<Text {...resolvedLabelProps} />
401401
{/if}
402402

403-
{#each tickVals as tick, index (tick)}
403+
{#each tickVals as tick, index (tick.valueOf())}
404404
{@const tickCoords = getCoords(tick)}
405405
{@const [radialTickCoordsX, radialTickCoordsY] = pointRadial(tickCoords.x, tickCoords.y)}
406406
{@const [radialTickMarkCoordsX, radialTickMarkCoordsY] = pointRadial(

0 commit comments

Comments
 (0)