Skip to content

Commit c6ff343

Browse files
committed
[Axis] Fallback to tick value if no tick format defined (band scales)
1 parent ac6cf3f commit c6ff343

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/tiny-cooks-wash.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+
[Axis] Fallback to tick value if no tick format defined (band scales)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
<Text
245245
x={orientation === 'angle' ? radialTickCoords[0] : tickCoords.x}
246246
y={orientation === 'angle' ? radialTickCoords[1] : tickCoords.y}
247-
value={formatValue(tick, format ?? scale.tickFormat?.())}
247+
value={formatValue(tick, format ?? scale.tickFormat?.() ?? ((v) => v))}
248248
{...getDefaultLabelProps(tick)}
249249
{...labelProps}
250250
class={cls(

0 commit comments

Comments
 (0)