Features · layout

Composed dashboards / concatenation

native

Multiple views in one spec

Matrix status native. Verification runtime · strong. ChartKit option: layout.concat.

layout.concat.views is a list of chart specs stacked vertically, placed in a row, or wrapped with columns. A view may set span to cover more than one column. An empty list warns CK3044. A view with no type warns CK3045. Facet and concat together warn CK3048.

Source: packages/core/src/layout.ts

ChartKit spec

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

Units rose while cost fell.Units rose while cost fell.UnitsUnits rose in Q2.Units0204060Q1Q2CostCost fell in Q2.Cost141618Q1Q2
{
  "version": "1",
  "type": "line",
  "data": [
    {
      "quarter": "Q1",
      "units": 40
    },
    {
      "quarter": "Q2",
      "units": 55
    }
  ],
  "encoding": {
    "x": "quarter",
    "y": "units"
  },
  "a11y": {
    "alt": "Units rose while cost fell."
  },
  "size": {
    "width": 640,
    "height": 260
  },
  "layout": {
    "concat": {
      "direction": "vertical",
      "views": [
        {
          "version": "1",
          "type": "bar",
          "title": "Units",
          "data": [
            {
              "quarter": "Q1",
              "units": 40
            },
            {
              "quarter": "Q2",
              "units": 55
            }
          ],
          "encoding": {
            "x": "quarter",
            "y": "units"
          },
          "a11y": {
            "alt": "Units rose in Q2."
          }
        },
        {
          "version": "1",
          "type": "line",
          "title": "Cost",
          "data": [
            {
              "quarter": "Q1",
              "cost": 18
            },
            {
              "quarter": "Q2",
              "cost": 14
            }
          ],
          "encoding": {
            "x": "quarter",
            "y": "cost"
          },
          "a11y": {
            "alt": "Cost fell in Q2."
          }
        }
      ]
    }
  }
}

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: layout.concat.md.

LibraryStatusOptionVerificationSource
Chart.jsnone—absence · absence—
Rechartsnone—absence · absence—
Apache EChartsnativegridmultiple coordinate systems in one optiontypes · strongecharts/types/dist/shared.d.ts:12570
Highchartsnone—absence · absence—
Plotly.jsnativelayout.gridtypes · strongplot-schema.json#layout.layoutAttributes.grid
Nivonone—absence · absence—
Victoryunknown—conflict · unknown—
visxnone—absence · absence—
ApexChartsnone—absence · absence—
Tremor (npm)none—absence · absence—
Observable Plotnone—absence · absence—
Vega-Litenativegrep: hconcatgrep · weak5232: "description"
AG Chartsunknown—conflict · unknown—
amCharts 5none—absence · absence—
Google ChartsnativeDashboardtypes · strong@types/google.visualization/index.d.ts:1352
uPlotnone—absence · absence—
TradingView Lightweight ChartsnativeIChartApi.panestypes · stronglightweight-charts/dist/typings.d.ts:1779
MUI X Chartsnone—absence · absence—
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: spaceFlexgrep · weak@antv/g2/lib/index.d.ts:159