Skip to content

Commit 3788e9d

Browse files
committed
dont plot null values at all (was plotting as zeros)
1 parent 6a442bc commit 3788e9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Chart.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,10 +719,11 @@
719719
ctx.fillStyle = color;
720720
ctx.beginPath();
721721
for (let i = 0; i < data.length; i++) {
722-
const y = value2y(dataset.getPointValue(i));
723-
if (isNaN(y)) {
722+
const ptVal = dataset.getPointValue(i);
723+
if (isNaN(ptVal) or ptVal == null) {
724724
continue;
725725
}
726+
const y = value2y(ptVal);
726727
date1 = date2;
727728
date2 = data[i].getDate().getIndex();
728729
if (date2 - date1 !== gap) {

0 commit comments

Comments
 (0)