Skip to content

Commit 600a495

Browse files
committed
fix: tick format crashing
1 parent 6c86a47 commit 600a495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/chart/src/components/LinearChart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,8 @@ const LinearChart = forwardRef<SVGAElement, LinearChartProps>(({ parentHeight, p
10621062
const labelVerticalAnchor = labelsAboveGridlines ? 'end' : 'middle'
10631063
const combineDomInlineLabelWithValue = inlineLabel && labelsAboveGridlines && lastTick
10641064
const formattedValue = useInlineLabel
1065-
? tick.formattedValue.replace(config.dataFormat.suffix, '')
1066-
: tick.formattedValue
1065+
? String(tick?.formattedValue || '').replace(config.dataFormat.suffix, '')
1066+
: tick?.formattedValue
10671067

10681068
return (
10691069
<Group key={`vx-tick-${tick.value}-${i}`} className={'vx-axis-tick'}>

0 commit comments

Comments
 (0)