Ngx-charts: Line breaks after null value

802 Views Asked by At

Line chart breaks after null value as the title says. It plots line until point with value: null comes, after that only points are plotted but line isn't. I can fix this by manually changing null into 0 or NaN and it will be plotted as 0 or connected from last non-null value to the next non-null value, but i would like a non-continuous line.

enter image description here

I've seen solution to this problem here and tried to implement it using patch-package (which does it job in changing node_modules package) but the change isn't seen in Chrome's DevTools. https://github.com/swimlane/ngx-charts/issues/799

One of the errors i get in Chrome's DevTools: enter image description here

How to replicate? Install ngx-charts and insert series that contains element with value null. You can also try to add patch-package and add following code at the end of functions getLineGenerator() and getRangeGenerator() which is supposed to fix this issue.

.defined(function(d) {
            return d.value !== null; ;
        });
0

There are 0 best solutions below