Area with rolling mean
An area chart showing daily high and low temperatures with smoothed rolling window lines.
<Plot inset={5}>
<AreaY
data={sftemp}
x="date"
y1="low"
y2="high"
opacity="0.2" />
<Line
{...windowY(
{ data: sftemp, x: 'date', y: 'low' },
{ k, anchor, strict, reduce }
)}
stroke="var(--svp-blue)" />
<Line
{...windowY(
{ data: sftemp, x: 'date', y: 'high' },
{ k, anchor, strict, reduce }
)}
stroke="var(--svp-red)" />
<AreaY
{...windowY(
{
data: sftemp,
x: 'date',
y1: 'high',
y2: 'low'
},
{ k, anchor, strict, reduce }
)}
fillOpacity={0.15}
fill="yellow"
mixBlendMode="multiply" />
</Plot>