This is a simplified version of Elijah Meeks’ Divided Line II block
that uses a d3 threshold scale instead of a custom parameters
function. The dividedLine
function takes an aesthetic
function as a parameter, which unpacks an attribute of the point object (y
, in this case) and applies the scale.