multiarea with threshold
The chart visualizes trends in free sugar intake across adult age groups over four paired survey years, highlighting values relative to a fixed threshold of 11% of total energy. A diverging color gradient (blue below, red above) fills the area under each line, immediately separating groups that stay above or dip below the cutoff. The code uses D3 v5 with an SVG area generator, a linear gradient defined via `svg.append('defs')`, and `d3.scalePoint` for the categorical year axis. Data comes from the NDNS Rolling Programme CSV, filtered to adult rows only, with rendering handled through SVG paths and axes.
AI-generated descriptionBuilt with blockbuilder.org
forked from <a href='http://bl.ocks.org/GitNoise/'>GitNoise</a>'s block: <a href='http://bl.ocks.org/GitNoise/ec1c0ad8674e5769f39f6c141a60a913'>multiline with threshold </a>