Date formatting
native
Date/time tick and tooltip formats
Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.axes.x.format.style=date.
Source: chartkit:packages/core/src/generated/schema.ts:644
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
},
"axes": {
"x": {
"format": {
"style": "date"
}
}
}
}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: format.date.md.
| Library | Status | Option | Verification | Source |
|---|---|---|---|---|
| Chart.js | plugin | —time.displayFormats | npm · weak | — |
| Recharts | manual | Customized | mechanism · weak | recharts/types/component/Customized.d.ts:26 |
| Apache ECharts | native | grep: formattertime axis formatter templates {yyyy} | grep · weak | echarts/types/dist/shared.d.ts:2768 |
| Highcharts | native | xAxis.dateTimeLabelFormats | types · strong | highcharts/highcharts.d.ts:108217 |
| Plotly.js | native | layout.xaxis.tickformatd3-time-format | types · strong | plot-schema.json#layout.layoutAttributes.xaxis.tickformat |
| Nivo | native | grep: formatxFormat 'time:%Y' | grep · weak | @nivo/legends/dist/types/types.d.ts:3 |
| Victory | manual | VictoryBarProps.dataComponent | mechanism · weak | victory-core/lib/victory-util/common-props.d.ts:9 |
| visx | manual | Group | mechanism · weak | @visx/group/lib/Group.d.ts:15 |
| ApexCharts | native | xaxis.labels.datetimeFormatter | types · strong | apexcharts/types/apexcharts.d.ts:4928 |
| Tremor (npm) | none | — | absence · absence | — |
| Observable Plot | native | grep: tickFormat | grep · weak | @observablehq/plot/src/scales.d.ts:591 |
| Vega-Lite | native | grep: timeFormat | grep · weak | 84: "description" |
| AG Charts | native | grep: formattime format strings | grep · weak | ag-charts-types/dist/types/src/serverSideRenderingOptions.d.ts:3 |
| amCharts 5 | native | grep: dateFormats | grep · weak | @amcharts/amcharts5/index.d.ts:69 |
| Google Charts | native | DateFormat | types · strong | @types/google.visualization/index.d.ts:1599 |
| uPlot | native | Options.axes.valuesfmtDate templates | types · strong | uplot/dist/uPlot.d.ts:1108 |
| TradingView Lightweight Charts | native | grep: timeFormatter | grep · weak | 3343: timeFormatter? |
| MUI X Charts | native | grep: valueFormatter | grep · weak | @mui/x-charts/SparkLineChart/SparkLineChart.d.ts:43 |
| Mermaid (chart-ish diagrams only) | native | grep: axisFormatgantt | grep · weak | mermaid/dist/config.type.d.ts:590 |
| AntV G2 | native | grep: labelFormatter | grep · weak | @antv/g2/lib/component/legendCategory.d.ts:5 |