Features · axis

Alternating bands / plot bands

native

Shaded alternating stripes or bands on an axis

Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.axes.x.bands.

axes.x.bands and axes.y.bands shade ranges. x also accepts "weekends" when x is dates.

Source: chartkit:packages/core/src/annotations.ts:19

ChartKit spec

Passed validate() during npm run matrix:refresh. The SVG is the server render.

Units rose in Q2.Units rose in Q2.Window40455055Q1Q2
{
  "version": "1",
  "type": "line",
  "data": [
    {
      "quarter": "Q1",
      "units": 40
    },
    {
      "quarter": "Q2",
      "units": 55
    }
  ],
  "encoding": {
    "x": "quarter",
    "y": "units"
  },
  "a11y": {
    "alt": "Units rose in Q2."
  },
  "size": {
    "width": 640,
    "height": 260
  },
  "axes": {
    "x": {
      "bands": [
        {
          "from": "Q1",
          "to": "Q2",
          "label": "Window"
        }
      ]
    }
  }
}

Other libraries

Option names are the paths recorded in the matrix. A grep-only cell names the identifier that matched, not a render test. Markdown copy: axis.bands.md.

LibraryStatusOptionVerificationSource
Chart.jsplugin—npm · weak—
RechartsnativeReferenceAreatypes · strongrecharts/types/cartesian/ReferenceArea.d.ts:129
Apache EChartsnativeyAxis.splitAreatypes · strongecharts/types/dist/shared.d.ts:2623
HighchartsnativeyAxis.plotBands, yAxis.alternateGridColortypes · stronghighcharts/highcharts.d.ts:110494
Plotly.jsnativelayout.shapestypes · strongplot-schema.json#layout.layoutAttributes.shapes
NivomanualLine.layersmechanism · weak@nivo/line/dist/types/types.d.ts:171
VictorymanualVictoryBarProps.dataComponentmechanism · weakvictory-core/lib/victory-util/common-props.d.ts:9
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativegrid.row.colorstypes · strongapexcharts/types/apexcharts.d.ts:5286
Tremor (npm)none—absence · absence—
Observable PlotnativerectYbands as markstypes · strong@observablehq/plot/src/marks/rect.d.ts:270
Vega-LitemanualTopLevelSpec.layermechanism · weakvega-lite/build/spec/layer.d.ts:27
AG Chartsnativegrep: crossLinesgrep · weakag-charts-enterprise/dist/types/src/main.d.ts:9
amCharts 5nativegrep: axisFillaxis ranges / alternating fillsgrep · weak@amcharts/amcharts5/.internal/plugins/json/ChartSerializer.d.ts:42
Google Chartsnone—absence · absence—
uPlotnativeOptions.bandstypes · stronguplot/dist/uPlot.d.ts:377
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsnativegrep: ChartsReferenceLinelines only; bands via customgrep · weak@mui/x-charts/index.d.ts:8
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: rangeYgrep · weak@antv/g2/lib/index.d.ts:82