Quadrant

A quadrant places one point per row on a square split into four named regions. The split is the midpoint of each axis. The default domain is 0 to 1. The point's name is drawn next to it.

When to use it

Use a quadrant when the question is which region a point falls in. Where the quarter goes is effort against impact: quick wins, big bets, fill-ins, and thankless work. Paper Kite bets and Where the next build sits ask the same question with delight instead of impact.

A scatter is the free plot of two quantities. The scales fit the data, and there are no four regions and no corner names. Use a scatter when the question is the relationship. Use a quadrant when the midpoint is the decision.

Quadrant and scatter

Both draw a point from x and y. The frame is what changes.

type: "quadrant" tints four rectangles and writes quadrants in the corners. Order is top-left, top-right, bottom-left, bottom-right. Axis-end captions come from the channel title, split on |.

type: "scatter" has no quadrants array. A size channel there is a bubble field with a pixel range. A quadrant reads a size column as a radius, clamped from 4 to 18.

Data

Each row is one point. name is the label. x and y are numbers. encoding.x and encoding.y point at those fields. The domain defaults to 0..1. Set scale.domain when the numbers live somewhere else. A point outside the domain is CK1406 from validatePhase4.

quadrants is four strings. Where the quarter goes uses Quick wins, Big bets, Fill-ins, and Thankless. Omit the array and the corners stay blank. Four names stuffed into subtitle with pipes are not a subtitle. validatePhase4 reports CK1412 and moves them to quadrants.

The low and high captions are the channel title, split on |. Low effort|High effort writes Low effort at the left and High effort at the right. Omit the title and the ends say Low and High.

A column named size sets the radius. Omit the column and every point uses 8. encoding.size can name a different field. Deleting encoding.size does not turn size off while a column named size is still in the data. There is no mark key for it. Where the quarter goes sets size. Paper Kite bets and Where the next build sits do not, so those points share one radius.

A column named color paints the point. positive and done use the positive token. negative and crit use the negative token. accent and active use the accent. muted uses muted. Any other text uses the series palette by row. An empty color uses the accent. encoding.color can name a different field. The same rule applies: the column is read even when the encoding key is omitted. legend is not read, and point names are always drawn.

a11y.alt is required. One sentence, 10 to 500 characters, with the point of the chart.

quadrants
{
  "quadrants": ["Quick wins", "Big bets", "Fill-ins", "Thankless"]
}
axis captions
{
  "encoding": {
    "x": { "field": "x", "title": "Low effort|High effort" },
    "y": { "field": "y", "title": "Low impact|High impact" }
  }
}

A spec that renders

This is the smallest quadrant. version, type, and a11y.alt are required. The regions are A, B, C, and D. SSO sits in the top-left. R sits in the bottom-right. Size and color can be omitted. The points are one radius, in the accent color.

The chart loads from @chartkitdev/core/charts/quadrant, or from @chartkitdev/core/extra. It is not in the line bundle. validate() warns CK1011 and points at validatePhase4().

spec.json
{
  "version": "1",
  "type": "quadrant",
  "quadrants": [
    "A",
    "B",
    "C",
    "D"
  ],
  "data": [
    {
      "name": "SSO",
      "x": 0.2,
      "y": 0.8
    },
    {
      "name": "R",
      "x": 0.8,
      "y": 0.3
    }
  ],
  "encoding": {
    "x": "x",
    "y": "y"
  },
  "a11y": {
    "alt": "SSO is a win."
  }
}

Install core and the adapter for your framework. The menu in the sidebar picks the snippet. spec is the JSON above.

Import@chartkitdev/core/charts/quadrantBundle@chartkitdev/core/extraFamilyPlanning
React
npm install @chartkitdev/core
npm install @chartkitdev/react

import { Chart } from "@chartkitdev/react";

export function Panel() {
  return <Chart spec={spec} />;
}
Vanilla
npm install @chartkitdev/core
npm install @chartkitdev/vanilla

import { mount } from "@chartkitdev/vanilla";

const chart = mount(document.querySelector("#chart"), spec);
chart.update(spec);
Vue
npm install @chartkitdev/core
npm install @chartkitdev/vue

<script setup>
import { Chart } from "@chartkitdev/vue";
</script>

<template>
  <Chart :spec="spec" />
</template>
Svelte
npm install @chartkitdev/core
npm install @chartkitdev/svelte

<script>
  import { Chart } from "@chartkitdev/svelte";
</script>

<Chart {spec} />
Astro
npm install @chartkitdev/core
npm install @chartkitdev/astro

---
import { Chart } from "@chartkitdev/astro";
---

<Chart spec={spec} />
Solid
npm install @chartkitdev/core
npm install @chartkitdev/solid

import { Chart } from "@chartkitdev/solid";

export function Panel() {
  return <Chart spec={spec} />;
}
Qwik
npm install @chartkitdev/core
npm install @chartkitdev/qwik

import { component$ } from "@builder.io/qwik";
import { Chart } from "@chartkitdev/qwik";

export const Panel = component$(() => {
  return <Chart spec={spec} />;
});
Angular
npm install @chartkitdev/core
npm install @chartkitdev/angular

import { Component } from "@angular/core";
import { Chart } from "@chartkitdev/angular";

@Component({
  standalone: true,
  imports: [Chart],
  template: `<ck-chart [spec]="spec" />`,
})
export class Panel {
  spec = spec;
}
Custom element
npm install @chartkitdev/core
npm install @chartkitdev/element

import "@chartkitdev/element";

const chart = document.querySelector("chart-kit");
chart.spec = spec;

The option below is a key on the spec. The demo changes that key and updates the chart and the snippet together.

Examples

The rail switches among existing quadrant specs. Where the quarter goes is the core example, seven points with size and semantic color. Paper Kite bets is the showcase chart from a Mermaid quadrant, four points and no size column. Where the next build sits is the discovery chart. The spec has no title, so the switcher uses the showcase heading.

Tooltip

tooltip is on for a quadrant when the key is omitted. Hovering a point shows the name and the two coordinates. The same sentence is the SVG title. tooltip: false tells the hover card not to open. tooltip: true turns it on.

tooltip false
{
  "tooltip": false
}
tooltip true
{
  "tooltip": true
}

tooltip.fields is not read. The card is the mark label, not a field table. Turning the card off and on again puts a custom tooltip object back in the spec. The card still uses the mark label.

The rest of the spec

subtitle is a second line under the title. It is not where the four region names go. legend does not draw a key for color or size. Theme presets live on the playground, with a wider domain when 0..1 is the wrong scale.