3-D line chart with extruded ribbon bands

Sister to demo_barchart3d: same input shape (categories × series) but the values along X are connected as a line, and each series is extruded along Z into a ribbon (band) with `bandThickness` controlling how 'thick' the wall is. Each band has three visible faces — front polygon (line silhouette, optionally glossy gradient), top snake (line-following ribbon, lighter shade), right end-cap (vertical quad, darker shade). Painter's algorithm draws back-to-front.

3-D line band chart
3-D line band chart — 3-D line chart with extruded ribbon bands
JavaScript
// 3-D line chart with ribbon (band) extrusion — drives the
// `lineband3d` engine extension. Sister demo to `demo_barchart3d`.
// demo_lineband3d.js
//!NOIMAGE
//!OUTPUT: OUTPUT
//!PARAM: TITLE:string=Monatsumsatz 2023–2025
//!PARAM: GLOSSY:bool=true
//!PARAM: WIDTH:integer=900,min=400,max=1600
//!PARAM: HEIGHT:integer=600,min=300,max=1200
//!PARAM: LEGEND:enum(left|top|right|bottom|none)=right
//!PARAM: BAND_THICKNESS:number=0.4,min=0.05,max=0.9,step=0.05

// Three years of monthly revenue along X, stacked along Z. Each
// series renders as a flat ribbon — line traced in (X, Y) extruded
// by BAND_THICKNESS along the receding Z axis. Tweak `series` to feed
// your own data; every series must supply exactly one value per
// category.
const img = Engine.lineBand3D({
  title: TITLE,
  categories: [
    "Jan", "Feb", "Mar", "Apr", "May", "Jun",
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
  ],
  series: [
    { label: "2023", values: [12000, 14000, 13000, 15000, 18000, 21000, 20000, 19000, 22000, 25000, 27000, 30000] },
    { label: "2024", values: [14000, 16000, 17000, 19000, 21000, 24000, 23000, 22000, 25000, 28000, 30000, 33000] },
    { label: "2025", values: [16000, 18000, 20000, 23000, 26000, 28000, 27000, 26000, 29000, 32000, 35000, 38000] },
  ],
  yLabel: "EUR",
  xLabel: "Monat",
  zLabel: "Jahr",
  width: WIDTH,
  height: HEIGHT,
  glossy: GLOSSY,
  legend: LEGEND,
  bandThickness: BAND_THICKNESS,
});
img.save(OUTPUT);

// © 2026 Michael Lechner · mlc OpticScript · https://mlcgo.eu · Elastic License 2.0