block by curran ca03ca0edc33e8dcd8e6ddc7e57d8e25

Popping Effect

Full Screen

This example shows a “popping effect” from having a semi-transparent fill color and an opaque stroke. This can be achieved using a little-known CSS keyword currentColor, which uses the value from the color attribute on visual marks. This is a convenient way to compute the data-driven color once, but use it as both the fill and stroke color of marks.

Another advantage of this technique is that you can see where there are overlapping circles (which would occlude each other if marks were opaque).

Related to d3-color - color.fade([delta=0.2]).

forked from curran‘s block: Standalone Scatter Plot

index.html

iris.csv