Chart.js chart reference

July 27, 2026 · View on GitHub

This page is generated from the live chart-template registry (scripts/gen-chart-reference.ts). Do not edit it by hand — run npm run gen:reference.

The Chart.js backend is the lightweight embedding target for common chart families. It keeps the parameter surface intentionally small.

What this page covers

This reference lists the 21 chart types currently supported by the Chart.js backend, grouped into 5 categories. Each chart entry shows:

  • Encoding channels — the visual roles accepted in chart_spec.encodings, such as x, y, color, size, column, or row.
  • Options — template-specific chart_spec.chartProperties keys, including control type, domain, default, availability, and description.

Use the chart type name exactly as shown in chart_spec.chartType.

How to set encodings and options

Set encodings in chart_spec.encodings and chart-specific options in chart_spec.chartProperties. Option keys match the parameter names below:

{
  "chartType": "Bar Chart",
  "encodings": { "x": { "field": "category" }, "y": { "field": "value" } },
  "chartProperties": { "cornerRadius": 4, "stackMode": "normalize" }
}

The Availability column shows whether a parameter is always available or conditional, meaning it appears only when the data and encodings make it relevant. For example, log-scale controls appear only on wide-range axes. Non-applicable parameters are safe to pass; the assembler ignores them.

Scatter & Point

Scatter Plot

Encoding channels: x, y, color, size, opacity, column, row

ParameterControlDomainDefaultAvailabilityDescription
opacitynumber0.1 – 1 (step 0.05)1alwaysMark opacity.

Connected Scatter Plot

Encoding channels: x, y, order, color, detail, column, row

No template-specific parameters.

Bubble Chart

Encoding channels: x, y, size, color, opacity, column, row

ParameterControlDomainDefaultAvailabilityDescription
opacitynumber0.1 – 1 (step 0.05)0.6alwaysMark opacity.

Strip Plot

Encoding channels: x, y, color, size, column, row

ParameterControlDomainDefaultAvailabilityDescription
stepWidthnumber10 – 100 (step 5)20alwaysJitter spread width.
pointSizenumber0 – 150 (step 5)0alwaysPoint or marker size.
opacitynumber0 – 1 (step 0.05)0alwaysMark opacity.

Bar

Bar Chart

Encoding channels: x, y, color, opacity, column, row

ParameterControlDomainDefaultAvailabilityDescription
cornerRadiusnumber0 – 15 (step 1)0alwaysCorner radius for supported marks.

Grouped Bar Chart

Encoding channels: x, y, group, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
dodgechoiceauto (Auto), local (Local (compact)), global (Global (aligned))autoconditionalDodge

Stacked Bar Chart

Encoding channels: x, y, color, column, row

No template-specific parameters.

Combo Chart

Encoding channels: x, y, column, row

ParameterControlDomainDefaultAvailabilityDescription
cornerRadiusnumber0 – 15 (step 1)0alwaysCorner radius for supported marks.

Histogram

Encoding channels: x, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
binCountnumber5 – 50 (step 1)AutoalwaysMaximum bin cap; Auto lets the backend choose.

Waterfall Chart

Encoding channels: x, y, color, column, row

No template-specific parameters.

Gantt Chart

Encoding channels: y, x, x2, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
taskHeightnumber40 – 90 (step 5)70alwaysTask bar height as a percentage of each row.
cornerRadiusnumber0 – 8 (step 1)2alwaysCorner radius for supported marks.
intervalLabelstoggleon / offfalsealwaysText shown on task intervals.

Line & Area

Line Chart

Encoding channels: x, y, color, opacity, column, row

ParameterControlDomainDefaultAvailabilityDescription
interpolatechoiceDefault (linear) (default), linear (Linear), monotone (Monotone (smooth)), step (Step), step-before (Step Before), step-after (Step After), basis (Basis (smooth)), cardinal (Cardinal), catmull-rom (Catmull-Rom)alwaysLine or area interpolation method.

Bump Chart

Encoding channels: x, y, color, detail, column, row

No template-specific parameters.

Slope Chart

Encoding channels: x, y, color, detail, column, row

No template-specific parameters.

Area Chart

Encoding channels: x, y, color, opacity, column, row

ParameterControlDomainDefaultAvailabilityDescription
interpolatechoiceDefault (linear) (default), linear (Linear), monotone (Monotone (smooth)), step (Step), step-before (Step Before), step-after (Step After), basis (Basis (smooth)), cardinal (Cardinal), catmull-rom (Catmull-Rom)alwaysLine or area interpolation method.
opacitynumber0.1 – 1 (step 0.05)0.4conditionalMark opacity.
stackModechoiceStacked (default) (default), layered (Layered (overlap))alwaysStacking strategy for overlapping series.

Range Area Chart

Encoding channels: x, y, y2, color, column, row

No template-specific parameters.

ECDF Plot

Encoding channels: x, color, detail, column, row

ParameterControlDomainDefaultAvailabilityDescription
showPointstoggleon / offfalsealwaysOverlay point markers on the line.

Part-to-Whole

Pie Chart

Encoding channels: size, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
innerRadiusnumber0 – 60 (step 5)0alwaysInner radius as a percentage of the outer radius.
sortSliceschoicenone (Data order), descending (Largest first), ascending (Smallest first)nonealwaysSort slices

Doughnut Chart

Encoding channels: size, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
innerRadiusnumber20 – 80 (step 5)55alwaysInner radius as a percentage of the outer radius.
sortSliceschoicenone (Data order), descending (Largest first), ascending (Smallest first)nonealwaysSort slices

Polar

Radar Chart

Encoding channels: x, y, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
filledchoicetrue (Filled (default)), false (Outline only)alwaysFill the enclosed radar area.
fillOpacitynumber0.05 – 0.8 (step 0.05)0.3alwaysFill opacity for the area or region.

Rose Chart

Encoding channels: x, y, color, column, row

ParameterControlDomainDefaultAvailabilityDescription
alignmentchoiceleft (Left (default)), center (Center)alwaysSegment alignment for radial charts.
sortSliceschoicenone (Data order), descending (Largest first), ascending (Smallest first)nonealwaysSort slices