Skip to content

Commit c0c96e5

Browse files
committed
single paths for undefined data
1 parent 35c0589 commit c0c96e5

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

src/marks/area.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class Area extends Mark {
4242
.call(applyDirectStyles, this)
4343
.call(applyGroupedChannelStyles, this, channels)
4444
.attr("d", shapeArea()
45+
.defined(i => i >= 0)
4546
.curve(this.curve)
4647
.x0(i => X1[i])
4748
.y0(i => Y1[i])

src/marks/line.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export class Line extends Mark {
4343
.call(applyGroupedChannelStyles, this, channels)
4444
.call(applyGroupedMarkers, this, channels)
4545
.attr("d", shapeLine()
46+
.defined(i => i >= 0)
4647
.curve(this.curve)
4748
.x(i => X[i])
4849
.y(i => Y[i])))

src/style.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,10 @@ export function* groupIndex(I, position, channels) {
191191
let Gg; // the current group index (a subset of G, and I), if any
192192
out: for (const i of G) {
193193

194-
// If any channel has an undefined value for this index, yield the current
195-
// group and start a new empty group, skipping this index.
194+
// If any channel has an undefined value for this index, skip it.
196195
for (const c of C) {
197196
if (!defined(c[i])) {
198-
if (Gg) yield Gg;
199-
Ag = Gg = undefined;
197+
if (Gg) Gg.push(-1);
200198
continue out;
201199
}
202200
}

test/output/availability.svg

Lines changed: 1 addition & 3 deletions
Loading

test/output/carsParcoords.svg

Lines changed: 6 additions & 12 deletions
Loading

0 commit comments

Comments
 (0)