Features · scale

Reversed scale

native

Flip axis direction

Matrix status native. Verification runtime · strong. ChartKit option: ChartKitChartSpecV1.encoding.y.scale.reverse.

drawn on createRenderer([line]) since PR #17 (main 116d0af)

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

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": {
      "field": "units",
      "scale": {
        "reverse": true
      }
    }
  },
  "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: scale.reverse.md.

LibraryStatusOptionVerificationSource
Chart.jsnativegrep: reversegrep · weakchart.js/dist/types/index.d.ts:1054
RechartsnativeYAxis.reversedtypes · strongrecharts/types/util/types.d.ts:850
Apache EChartsnativeyAxis.inversetypes · strongecharts/types/dist/shared.d.ts:2574
HighchartsnativeyAxis.reversedtypes · stronghighcharts/highcharts.d.ts:110532
Plotly.jsnativelayout.yaxis.autorange=reversedtypes · strongplot-schema.json#layout.layoutAttributes.yaxis.autorange
Nivonativegrep: reversegrep · weak@nivo/scales/dist/types/types.d.ts:38
VictorypartialVictoryChart.scalevia domain orderingtypes · strongvictory-core/lib/victory-util/common-props.d.ts:42
visxunknown—conflict · unknown—
ApexChartsnativeyaxis.reversedtypes · strongapexcharts/types/apexcharts.d.ts:5037
Tremor (npm)none—absence · absence—
Observable Plotnativegrep: reversegrep · weak@observablehq/plot/src/scales.d.ts:364
Vega-Litenativegrep: reversegrep · weak21930: "reverse"
AG Chartsnativegrep: reversegrep · weakag-charts-types/dist/types/src/presets/sparkline/sparklineAxisOptions.d.ts:9
amCharts 5nativegrep: inversedgrep · weak@amcharts/amcharts5/.internal/charts/hierarchy/Tree.d.ts:38
Google Chartsnativegrep: directionvAxis.direction: -1grep · weak@types/google.visualization/index.d.ts:528
uPlotnativegrep: dirscales.y.dir: -1grep · weak480: /** when x & y are true, sets an upper drag limit in CSS px for adaptive/unidirectional behavior */
TradingView Lightweight Chartsnativegrep: invertScalegrep · weak3726: invertScale
MUI X ChartsnativeLineChart.yAxis.reversetypes · strong@mui/x-charts/models/axis.d.mts:525
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2nativegrep: reversegrep · weak@antv/g2/lib/index.d.ts:168