Skip to content

Halo for lines? #860

Open
Open
@mbostock

Description

@mbostock

I wonder if we want something like this…

Screen Shot 2022-05-04 at 2 55 55 PM

diff --git a/src/marks/line.js b/src/marks/line.js
index f12d798..fba2591 100644
--- a/src/marks/line.js
+++ b/src/marks/line.js
@@ -53,7 +53,11 @@ export class Line extends Mark {
               .curve(this.curve)
               .defined(i => i >= 0)
               .x(i => X[i])
-              .y(i => Y[i])))
+              .y(i => Y[i]))
+          .clone(true)
+            .each(function() { this.parentNode.insertBefore(this, this.previousSibling); })
+            .attr("stroke-width", 4)
+            .attr("stroke", "white"))
       .node();
   }
 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions