Band chart with rule

A ruleX encodes a vertical extent at a given horizontal position.

Plot.plot({
  y: {grid: true, label: "↑ Temperature (°C)"},
  color: {scheme: "BuRd"},
  marks: [
    Plot.ruleY([0]),
    Plot.ruleX(seattle, {x: "date", y1: "temp_min", y2: "temp_max", stroke: "temp_min"})
  ]
})
const seattle = FileAttachment("data/seattle-weather.csv").csv({typed: true}).then(display);
✎ Suggest changes to this page