Features · data

Sorting categories

native

Sort bars/categories by value or custom order

Matrix status native. Verification types · strong. ChartKit option: ChartKitChartSpecV1.sort.

sort by a field or by value, ascending or descending

Source: chartkit:packages/core/src/sort.ts:1

ChartKit spec

Passed validate() during npm run matrix:refresh. The SVG is the server render.

Lane C has more.Lane C has more.051015CA
{
  "version": "1",
  "type": "bar",
  "data": [
    {
      "lane": "A",
      "stops": 12
    },
    {
      "lane": "C",
      "stops": 15
    }
  ],
  "encoding": {
    "x": "lane",
    "y": "stops"
  },
  "a11y": {
    "alt": "Lane C has more."
  },
  "size": {
    "width": 640,
    "height": 260
  },
  "sort": {
    "by": "value",
    "order": "descending"
  }
}

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: data.sort.md.

LibraryStatusOptionVerificationSource
Chart.jsunknown—conflict · unknown—
Rechartsunknown—conflict · unknown—
Apache EChartsnativedataset.transformsort transformtypes · strongecharts/types/dist/shared.d.ts:5304
Highchartsnativegrep: dataSortingdataSorting.enabledgrep · weakhighcharts/options/zigzag.src.d.ts:404
Plotly.jsnativelayout.xaxis.categoryordertypes · strongplot-schema.json#layout.layoutAttributes.xaxis.categoryorder
Nivounknown—conflict · unknown—
VictorynativeVictoryBar.sortKey, VictoryBar.sortOrdertypes · strongvictory-core/lib/victory-util/common-props.d.ts:13
visxunknown—conflict · unknown—
ApexChartsunknown—conflict · unknown—
Tremor (npm)unknown—conflict · unknown—
Observable Plotnativegrep: sortmark sort option + scale domain sortgrep · weak@observablehq/plot/src/mark.d.ts:2
Vega-Litenativegrep: SortFieldgrep · weak101: "AllSortString"
AG Chartsunknown—conflict · unknown—
amCharts 5unknowngrep: sortBycategoryAxis sorting via data.sortunverified · unknown—
Google Chartsnativegrep: sortColumngrep · weak@types/google.visualization/index.d.ts:169
uPlotunknown—conflict · unknown—
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsunknown—conflict · unknown—
Mermaid (chart-ish diagrams only)unknown—conflict · unknown—
AntV G2nativegrep: sortXgrep · weak@antv/g2/lib/index.d.ts:45