Features · axis

Tick label rotation

native

Rotate tick labels by an angle

Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.axes.x.rotate.

degrees; auto -40 when crowded labels fit; drawn on createRenderer([line]) since PR #17 (main 116d0af)

Source: chartkit:packages/core/src/generated/schema.ts:983

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": {
      "rotate": -40
    }
  }
}

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: axis.ticks.rotate.md.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: maxRotationticks.minRotation / maxRotationgrep · weakchart.js/dist/types/index.d.ts:3146
RechartsnativeXAxis.angletypes · strongrecharts/types/util/types.d.ts:738
Apache EChartsnativexAxis.axisLabel.rotatetypes · strongecharts/types/dist/shared.d.ts:2803
HighchartsnativexAxis.labels.rotationtypes · stronghighcharts/highcharts.d.ts:108025
Plotly.jsnativelayout.xaxis.tickangletypes · strongplot-schema.json#layout.layoutAttributes.xaxis.tickangle
Nivonativegrep: tickRotationgrep · weak@nivo/polar-axes/dist/types/types.d.ts:28
VictorynativeVictoryAxis.tickLabelComponentVictoryLabel angletypes · strongvictory-core/lib/victory-theme/types.d.ts:56
visxnativeAxisBottom.tickLabelPropsangle via propstypes · strong@visx/axis/lib/types.d.ts:69
ApexChartsnativexaxis.labels.rotatetypes · strongapexcharts/types/apexcharts.d.ts:4909
Tremor (npm)nativeLineChart.rotateLabelXtypes · strong@tremor/react/dist/index.d.ts:81
Observable Plotnativegrep: tickRotategrep · weak@observablehq/plot/src/scales.d.ts:577
Vega-Litenativegrep: labelAnglegrep · weak1283: "labelAngle"
AG Chartsnativegrep: rotationgrep · weakag-charts-types/dist/types/src/presets/gauge/radialGaugeOptions.d.ts:65
amCharts 5nativegrep: rotationgrep · weak@amcharts/amcharts5/.internal/core/util/Matrix.d.ts:41
Google Chartsnativegrep: slantedTextAnglegrep · weak@types/google.visualization/index.d.ts:540
uPlotnativeOptions.axes.rotatetypes · stronguplot/dist/uPlot.d.ts:1111
TradingView Lightweight Chartsnone—absence · absence—
MUI X ChartsnativeLineChart.xAxisangle in tickLabelStyletypes · strong@mui/x-charts/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxis.types.d.mts:25
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2nativegrep: labelTransformgrep · weak@antv/g2/lib/index.d.ts:165