Features · format

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.

Units rose in Q2.Units rose in Q2.40455055Q1Q2
{
  "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.

LibraryStatusOptionVerificationSource
Chart.jsplugin—time.displayFormatsnpm · weak—
RechartsmanualCustomizedmechanism · weakrecharts/types/component/Customized.d.ts:26
Apache EChartsnativegrep: formattertime axis formatter templates {yyyy}grep · weakecharts/types/dist/shared.d.ts:2768
HighchartsnativexAxis.dateTimeLabelFormatstypes · stronghighcharts/highcharts.d.ts:108217
Plotly.jsnativelayout.xaxis.tickformatd3-time-formattypes · strongplot-schema.json#layout.layoutAttributes.xaxis.tickformat
Nivonativegrep: formatxFormat 'time:%Y'grep · weak@nivo/legends/dist/types/types.d.ts:3
VictorymanualVictoryBarProps.dataComponentmechanism · weakvictory-core/lib/victory-util/common-props.d.ts:9
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsnativexaxis.labels.datetimeFormattertypes · strongapexcharts/types/apexcharts.d.ts:4928
Tremor (npm)none—absence · absence—
Observable Plotnativegrep: tickFormatgrep · weak@observablehq/plot/src/scales.d.ts:591
Vega-Litenativegrep: timeFormatgrep · weak84: "description"
AG Chartsnativegrep: formattime format stringsgrep · weakag-charts-types/dist/types/src/serverSideRenderingOptions.d.ts:3
amCharts 5nativegrep: dateFormatsgrep · weak@amcharts/amcharts5/index.d.ts:69
Google ChartsnativeDateFormattypes · strong@types/google.visualization/index.d.ts:1599
uPlotnativeOptions.axes.valuesfmtDate templatestypes · stronguplot/dist/uPlot.d.ts:1108
TradingView Lightweight Chartsnativegrep: timeFormattergrep · weak3343: timeFormatter?
MUI X Chartsnativegrep: valueFormattergrep · weak@mui/x-charts/SparkLineChart/SparkLineChart.d.ts:43
Mermaid (chart-ish diagrams only)nativegrep: axisFormatganttgrep · weakmermaid/dist/config.type.d.ts:590
AntV G2nativegrep: labelFormattergrep · weak@antv/g2/lib/component/legendCategory.d.ts:5