plot icon indicating copy to clipboard operation
plot copied to clipboard

line halo

Open Fil opened this issue 3 years ago • 4 comments

An unexpected difficulty was to make it compatible with group aesthetics. I had to pass a flag (in the shape of a counter) to secondary groups. For now I just "walk back to the first element", and don't use the counter per se, because we might want to switch to a real flag that would be absent from the first group—which might be more satisfying?

closes #860

a follow-up could be to add the halo option to other "non-fillable" marks: Plot.link, Plot.arrow, Plot.tick, Plot.rule…

line chart with faint halo

Fil avatar May 13 '22 17:05 Fil

A problem currently is that the halo option can be an object containing anything. I don't know how to check that the values are numbers or strings as we usually do for normal options.

Fil avatar May 16 '22 08:05 Fil

scratch that, a much better solution will be to use a svg filter (#409). I have a prototype here https://observablehq.com/@fil/line-halo-in-pure-svg

Fil avatar May 28 '22 16:05 Fil

new version with the SVG filter strategy

Fil avatar Jul 11 '22 13:07 Fil

manually rebased

Fil avatar Oct 18 '22 00:10 Fil

This seems like a nice feature. The implementation needs some tidying.

mbostock avatar Apr 01 '23 18:04 mbostock

A similar situation arises with the line opacity when the line is broken into segments for varying aesthetics: https://talk.observablehq.com/t/opacity-artifacts-in-line-segments/8142/2

Fil avatar Jul 31 '23 19:07 Fil