Skip to content

Commit e3a3a47

Browse files
committed
fixes for non-contigous data - use a null value for y
1 parent 1c8757a commit e3a3a47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LineAreaChart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ vizuly2.viz.LineAreaChart = function (parent) {
498498

499499
// Set our accessors so the d3.area can generate our area path data
500500
area.curve(scope.curve)
501-
.defined(function(d) { return (d.data) ? d : null; })
501+
.defined(function(d, i) { return (scope.y(d.data) != null) })
502502
.x(function (d, i) {
503503
return scope.xScale(scope.x(d.data, i));
504504
})
@@ -511,7 +511,7 @@ vizuly2.viz.LineAreaChart = function (parent) {
511511

512512
// Set our accessors so the d3.line can generate our line path data
513513
line.curve(scope.curve)
514-
.defined(function(d) { return (d.data) ? d : null; })
514+
.defined(function(d, i) { return (scope.y(d.data) != null) })
515515
.x(function (d, i) {
516516
return scope.xScale(scope.x(d.data, i));
517517
})

0 commit comments

Comments
 (0)