Skip to content

Commit 96a7250

Browse files
committed
move yAxisTickFormatter to default prop value
1 parent 3619417 commit 96a7250

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/components/TimeSeriesChart.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default function TimeSeriesChart({
130130
startTime,
131131
endTime,
132132
unit,
133-
yAxisTickFormatter,
133+
yAxisTickFormatter = (val) => val.toLocaleString(),
134134
}: TimeSeriesChartProps) {
135135
// We use the largest data point +20% for the graph scale. !rawData doesn't
136136
// mean it's empty (it will never be empty because we fill in artificial 0s at
@@ -184,7 +184,7 @@ export default function TimeSeriesChart({
184184
orientation="right"
185185
tick={textMonoMd}
186186
tickMargin={8}
187-
tickFormatter={yAxisTickFormatter || ((val: number) => val.toLocaleString())}
187+
tickFormatter={yAxisTickFormatter}
188188
padding={{ top: 32 }}
189189
{...yTicks}
190190
/>

0 commit comments

Comments
 (0)