Chart and plot background
native
Background colour/transparency of chart and plot area
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.theme.tokens.background, ChartKitChartSpecV1.theme.tokens.surface.
Source: chartkit:packages/core/src/generated/schema.ts:348, chartkit:packages/core/src/generated/schema.ts:352
ChartKit spec
Passed validate() during npm run matrix:refresh. The SVG is the server render.
{
"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
},
"theme": {
"tokens": {
"background": "#5c6b7a"
}
}
}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: theme.background.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | manual | Plugin.afterDatasetsDrawplugin | mechanism · weak | chart.js/dist/types/index.d.ts:1051 |
| Recharts | unknown | — | conflict · unknown | — |
| Apache ECharts | native | backgroundColor | types · strong | echarts/types/dist/shared.d.ts:7435 |
| Highcharts | native | chart.backgroundColor, chart.plotBackgroundColor | types · strong | highcharts/highcharts.d.ts:6301 |
| Plotly.js | native | layout.paper_bgcolor, layout.plot_bgcolor | types · strong | plot-schema.json#layout.layoutAttributes.paper_bgcolor |
| Nivo | native | grep: background | grep · weak | @nivo/core/index.d.ts:149 |
| Victory | partial | VictoryChart.style | types · strong | victory-chart/lib/victory-chart.d.ts:22 |
| visx | manual | Group | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | native | chart.background | types · strong | apexcharts/types/apexcharts.d.ts:1827 |
| Tremor (npm) | unknown | — | conflict · unknown | — |
| Observable Plot | native | grep: style | grep · weak | @observablehq/plot/src/plot.d.ts:13 |
| Vega-Lite | native | grep: background | grep · weak | 238: "description" |
| AG Charts | native | AgChartOptions.background | types · strong | ag-charts-types/dist/types/src/chart/chartOptions.d.ts:248 |
| amCharts 5 | native | grep: background | grep · weak | @amcharts/amcharts5/.internal/plugins/json/Serializer.d.ts:167 |
| Google Charts | native | grep: backgroundColor | grep · weak | @types/google.visualization/index.d.ts:372 |
| uPlot | manual | Options.hooks | mechanism · weak | uplot/dist/uPlot.d.ts:394 |
| TradingView Lightweight Charts | native | grep: background | grep · weak | 515: * The crosshair marker background color. An empty string falls back to the color of the series under the crosshair. |
| MUI X Charts | native | grep: sx | grep · weak | @mui/x-charts/index.d.ts:11 |
| Mermaid (chart-ish diagrams only) | native | grep: background | grep · weak | mermaid/dist/styles.d.ts:14 |
| AntV G2 | native | grep: viewFill | grep · weak | @antv/g2/lib/theme/create.d.ts:43 |