Features · interaction

Drilldown

native

Click a mark to drill into a child dataset

Matrix status native. Verification runtime · strong. ChartKit option: interaction.drilldown.

interaction.drilldown.children maps a category to a child JSON spec. Click, Enter, or Space swaps to that spec. Back and Escape pop. The server SVG lists the keys on data-ck-drill. An empty map warns CK3037. A child with no type warns CK3038. A key that is not a field warns CK3039.

Source: packages/core/src/interact.ts

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
  },
  "interaction": {
    "drilldown": {
      "key": "quarter",
      "children": {
        "Q1": {
          "version": "1",
          "type": "bar",
          "data": [
            {
              "name": "East",
              "units": 12
            },
            {
              "name": "West",
              "units": 9
            }
          ],
          "encoding": {
            "x": "name",
            "y": "units"
          },
          "a11y": {
            "alt": "East leads West in this category."
          }
        }
      }
    }
  }
}

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: interaction.drilldown.md.

LibraryStatusOptionVerificationSource
Chart.jsmanualPlugin.afterDatasetsDrawmechanism · weakchart.js/dist/types/index.d.ts:1051
RechartsmanualCustomizedmechanism · weakrecharts/types/component/Customized.d.ts:26
Apache EChartsnativeseries.nodeClicktreemap/sunburst zoomToNode; universal transition for drilldowntypes · strongecharts/types/dist/shared.d.ts:11442
Highchartsnativedrilldown.seriesdrilldown moduletypes · stronghighcharts/highcharts.d.ts:10666
Plotly.jspartialgrep: leveltreemap/sunburst/icicle drill by clickgrep · weak@types/plotly.js/index.d.ts:265
NivomanualLine.layersmechanism · weak@nivo/line/dist/types/types.d.ts:171
VictorymanualVictoryBarProps.dataComponentmechanism · weakvictory-core/lib/victory-util/common-props.d.ts:9
visxmanualGroupmechanism · weak@visx/group/lib/Group.d.ts:15
ApexChartsunknown—unverified · unknown—
Tremor (npm)none—absence · absence—
Observable Plotnone—absence · absence—
Vega-LitemanualTopLevelSpec.layermechanism · weakvega-lite/build/spec/layer.d.ts:27
AG Chartsnativegrep: drilldowntreemap/sunburst click to drillgrep · weakag-charts-types/dist/types/src/main.d.ts:31
amCharts 5nativegrep: zoomablehierarchy zoomable / drillgrep · weak@amcharts/amcharts5/index.d.ts:17
Google Chartsnativegrep: maxDepthTreeMap drill by clickgrep · weak@types/google.visualization/index.d.ts:1148
uPlotnone—absence · absence—
TradingView Lightweight Chartsnone—absence · absence—
MUI X Chartsnone—absence · absence—
Mermaid (chart-ish diagrams only)none—absence · absence—
AntV G2nativegrep: drillDowngrep · weak@antv/g2/lib/index.d.ts:156