Features · axis

Tick label wrapping / truncation

native

Wrap or ellipsize long labels

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

labelWidth and labelLines wrap tick labels on x, y, and y2, then ellipsize. Drawn on createRenderer([line]).

Source: packages/core/src/generated/schema.ts:1044

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": {
      "labelWidth": 48
    }
  }
}

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.wrap.md.

LibraryStatusOptionVerificationSource
Chart.jspartialgrep: callbackreturn arrays for multi-linegrep · weakchart.js/dist/types/index.d.ts:1216
RechartspartialXAxis.tickcustom tick componenttypes · strongrecharts/types/cartesian/XAxis.d.ts:101
Apache EChartsnativexAxis.axisLabel.overflow, xAxis.axisLabel.widthtypes · strongecharts/types/dist/shared.d.ts:7917
HighchartsnativexAxis.labels.styletextOverflow ellipsistypes · stronghighcharts/highcharts.d.ts:108063
Plotly.jsnone—absence · absence—
Nivopartialgrep: renderTickgrep · weak@nivo/axes/dist/types/types.d.ts:21
VictorypartialVictoryAxis.tickLabelComponenttypes · strongvictory-core/lib/victory-theme/types.d.ts:56
visxpartialgrep: Text@visx/text width wrappinggrep · weak@visx/sankey/node_modules/@types/d3-shape/index.d.ts:6
ApexChartsnativexaxis.labels.trim, xaxis.labels.maxHeighttypes · strongapexcharts/types/apexcharts.d.ts:4913
Tremor (npm)unknown—conflict · unknown—
Observable Plotnativegrep: lineWidthgrep · weak@observablehq/plot/src/marks/text.d.ts:29
Vega-Litenativegrep: labelLimitgrep · weak1424: "labelLimit"
AG Chartsnativegrep: wrappinggrep · weakag-charts-types/dist/types/src/chart/types.d.ts:52
amCharts 5nativegrep: oversizedBehaviorgrep · weak@amcharts/amcharts5/.internal/plugins/exporting/Exporting.d.ts:283
Google Chartsnativegrep: maxTextLinesgrep · weak@types/google.visualization/index.d.ts:542
uPlotnone—absence · absence—
TradingView Lightweight Chartsunknown—conflict · unknown—
MUI X Chartsnativegrep: tickLabelStylegrep · weak@mui/x-charts/constants/index.d.ts:14
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2unknowngrep: labelAutoEllipsisunverified · unknown—