Skip to content

Commit 1f01659

Browse files
committed
fix: dont draw circles if null / undefined value
1 parent dd2354a commit 1f01659

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/charting/renderer/LineChartRenderer.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -734,9 +734,10 @@ export class LineChartRenderer extends LineRadarRenderer {
734734
const e = dataSet.getEntryForIndex(j);
735735

736736
if (e == null) continue;
737-
737+
const yVal = e[yKey];
738+
if (yVal == null || yVal === undefined) continue;
738739
circleBuffer[0] = dataSet.getEntryXValue(e, j);
739-
circleBuffer[1] = e[yKey] * phaseY;
740+
circleBuffer[1] = yVal * phaseY;
740741

741742
trans.pointValuesToPixel(circleBuffer);
742743
// native buffer access is slow

0 commit comments

Comments
 (0)