Skip to content

Commit 6c328d6

Browse files
author
Nick Jansen
committed
feat: fix types
1 parent f7803a4 commit 6c328d6

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/shared/charts/src/hooks/usePlotChartDataSeries.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,16 @@ function extractDataPoints(
206206
const x = xValue.get(item);
207207
const y = yValue.get(item);
208208

209-
xData.push(x.value instanceof Big ? Number(x.value.toString()) : x.value);
210-
yData.push(y.value instanceof Big ? Number(y.value.toString()) : y.value);
209+
if (!x.value) {
210+
xData.push(null);
211+
} else {
212+
xData.push(x.value instanceof Big ? Number(x.value.toString()) : x.value);
213+
}
214+
if (!y.value) {
215+
yData.push(null);
216+
} else {
217+
yData.push(y.value instanceof Big ? Number(y.value.toString()) : y.value);
218+
}
211219

212220
const tooltipHoverTextSource =
213221
series.dataSet === "dynamic" ? series.dynamicTooltipHoverText : series.staticTooltipHoverText;

0 commit comments

Comments
 (0)