Dashed / dotted lines
native
Dash patterns on series lines
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.encoding.y.dash.
Source: chartkit:packages/core/src/generated/schema.ts:150
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": {
"field": "units",
"dash": "dashed"
}
},
"a11y": {
"alt": "Units rose in Q2."
},
"size": {
"width": 640,
"height": 260
}
}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.stroke.dash.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | native | ChartConfiguration.data.datasets.borderDash | types · strong | chart.js/dist/types/index.d.ts:1919 |
| Recharts | native | Line.strokeDasharray | types · strong | @types/react/index.d.ts:3923 |
| Apache ECharts | native | series.lineStyle.type | types · strong | echarts/types/dist/shared.d.ts:7782 |
| Highcharts | native | plotOptions.series.dashStyle | types · strong | highcharts/options/series.d.ts:805 |
| Plotly.js | native | trace.line.dash | types · strong | plot-schema.json#traces.{contour,contourcarpet,histogram2dcontour,ohlc,scatter,scatter3d,…}.attributes.line.dash |
| Nivo | partial | Line.layerscustom layer / theme | types · strong | @nivo/line/dist/types/types.d.ts:171 |
| Victory | native | VictoryLine.style | types · strong | victory-line/lib/victory-line.d.ts:84 |
| visx | native | LinePath.strokeDasharray | types · strong | @types/react/index.d.ts:3923 |
| ApexCharts | native | stroke.dashArray | types · strong | apexcharts/types/apexcharts.d.ts:2653 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: strokeDasharray | grep · weak | @observablehq/plot/src/mark.d.ts:357 |
| Vega-Lite | native | grep: strokeDash | grep · weak | 736: "strokeDash" |
| AG Charts | native | series.lineDash | types · strong | ag-charts-types/dist/types/src/series/cartesian/commonOptions.d.ts:170 |
| amCharts 5 | native | grep: strokeDasharray | grep · weak | @amcharts/amcharts5/.internal/charts/xy/XYChart.d.ts:37 |
| Google Charts | partial | grep: lineDashStylecertainty role / series lineDashStyle | grep · weak | @types/google.visualization/index.d.ts:761 |
| uPlot | native | Options.series.dash | types · strong | uplot/dist/uPlot.d.ts:941 |
| TradingView Lightweight Charts | native | grep: lineStyle | grep · weak | 73:export declare enum LineStyle { |
| MUI X Charts | partial | grep: strokeDasharrayvia sx/slotProps | grep · weak | @mui/x-charts/ChartsYAxis/useAxisTicksProps.d.ts:4065 |
| Mermaid (chart-ish diagrams only) | unknown | — | conflict · unknown | — |
| AntV G2 | native | grep: lineDash | grep · weak | @antv/g2/lib/theme/create.d.ts:207 |