From 4a4e83c5674e3b00d662d135d126fcfa0e5ad6a6 Mon Sep 17 00:00:00 2001 From: PT10 <38748694+PT10@users.noreply.github.com> Date: Mon, 7 Sep 2020 16:37:05 +0530 Subject: [PATCH] Fix for #2813 Checking if the value is null before plotting the line region (dashed line). If the value is null then there is no need to add the point in the SVG path. Without this check chart plots a solid line for data points with null value. Please refer to the description in the issue #2813. --- src/shape.line.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shape.line.ts b/src/shape.line.ts index 5a6275e7e..159ef1b4f 100644 --- a/src/shape.line.ts +++ b/src/shape.line.ts @@ -295,6 +295,9 @@ ChartInternal.prototype.lineWithRegions = function(d, x, y, _regions) { // Generate for (i = 0; i < d.length; i++) { + if (!d[i].value) { + continue; + } // Draw as normal if (isUndefined(regions) || !isWithinRegions(d[i].x, regions)) { s += ' ' + xValue(d[i]) + ' ' + yValue(d[i])