Gradient fills
native
Linear/radial gradient fills on areas/bars
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.mark.gradient.
Source: chartkit:packages/core/src/generated/schema.ts:827
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
},
"mark": {
"gradient": true
}
}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: mark.gradient.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | partial | grep: CanvasGradientpass a canvas gradient object | grep · weak | chart.js/dist/types/color.d.ts:1 |
| Recharts | unknown | grep: defsSVG <defs> linearGradient manually | unverified · unknown | — |
| Apache ECharts | native | grep: LinearGradientnew echarts.graphic.LinearGradient | grep · weak | echarts/types/src/visual/helper.d.ts:9 |
| Highcharts | native | grep: linearGradientcolor.linearGradient | grep · weak | highcharts/highcharts-autoload.src.d.ts:208 |
| Plotly.js | native | trace.fillgradient | types · strong | plot-schema.json#traces.{scatter}.attributes.fillgradient |
| Nivo | native | Line.defs, Line.filldefs + fill rules | types · strong | @nivo/core/index.d.ts:71 |
| Victory | partial | VictoryArea.styleurl(#gradient) via svg defs | types · strong | victory-area/lib/victory-area.d.ts:8 |
| visx | native | LinearGradient, RadialGradient | types · strong | @visx/gradient/lib/gradients/LinearGradient.d.ts:35 |
| ApexCharts | native | fill.gradient | types · strong | apexcharts/types/apexcharts.d.ts:4563 |
| Tremor (npm) | partial | AreaChart.showGradienton/off only | types · strong | @tremor/react/dist/index.d.ts:95 |
| Observable Plot | partial | grep: fillurl() refs; no gradient helper | grep · weak | @observablehq/plot/src/symbol.d.ts:5 |
| Vega-Lite | native | grep: gradient | grep · weak | 251: "$ref" |
| AG Charts | native | grep: gradientfill gradient options | grep · weak | ag-charts-types/dist/types/src/main.d.ts:26 |
| amCharts 5 | native | LinearGradient, RadialGradient | types · strong | @amcharts/amcharts5/.internal/core/render/gradients/LinearGradient.d.ts:20 |
| Google Charts | unknown | — | conflict · unknown | — |
| uPlot | partial | grep: fillfill: (u, si) => CanvasGradient | grep · weak | 303: export type Fill = CSSStyleDeclaration['background'] | ((self |
| TradingView Lightweight Charts | native | grep: topColorarea gradient top/bottom colours | grep · weak | 419: topColor? |
| MUI X Charts | partial | grep: gradientgradient on color scale / svg defs | grep · weak | @mui/x-charts/hooks/useChartGradientId.d.ts:3 |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | native | grep: linearcolor string 'l(0) 0:#fff 1:#000' | grep · weak | @antv/g2/lib/index.d.ts:91 |