Error Band Recipe

Life expectancy confidence bands with explicit boundaries
Grouped confidence ribbons with lower and upper paths.

Minimal flow

Runnable: install ggaction and provide the named data array as plain row objects.

import { chart } from "ggaction";

const program = chart()
  .createCanvas()
  .createData({ values })
  .createErrorBand({
    x: { field: "time", fieldType: "temporal" },
    y: { field: "value" },
    groupBy: "series"
  })
  .encodeColor({ target: "errorBand", field: "series" })
  .createGuides();

You must decide

The library infers

When one compatible layer is already encoded, omitted data, coordinate, position fields, scales, and explicit grouping are reused when the interval axis is unambiguous.

Continue

Error-band tutorial · Error-band API