# Box plot with points (Boxplot example)

> WestCoast Charts 1.1.5, release, public Core release, on npm. HTML: https://westcoast-charts.com/gallery/boxplot/boxplot-with-points/ · Index for agents: https://westcoast-charts.com/llms.txt

Boxes with every observation drawn on top, spread by a deterministic jitter (boxPlot wcc.jitter).

- Chart type: `boxPlot` (Box Plot)
- Collection: Boxplot · Box plot
- Raw configuration: https://westcoast-charts.com/gallery-src/boxplot/boxplot-with-points.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/boxplot/boxplot-with-points.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
```

## Options

```js
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "boxPlot",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Box",
      type: "boxPlot",
      data: [
        {
          x: "Team A",
          y: [31.9, 40.9, 46.1, 52.3, 71.6]
        },
        {
          x: "Team B",
          y: [43.3, 54.1, 57, 64.6, 73.6]
        },
        {
          x: "Team C",
          y: [48.9, 59.6, 65.8, 69.4, 80.6]
        }
      ]
    },
    {
      name: "Observations",
      type: "scatter",
      data: [
        {
          x: "Team A",
          y: 46
        },
        {
          x: "Team A",
          y: 41.8
        },
        {
          x: "Team A",
          y: 55.8
        },
        {
          x: "Team A",
          y: 46.1
        },
        {
          x: "Team A",
          y: 64.4
        },
        {
          x: "Team A",
          y: 33.8
        },
        {
          x: "Team A",
          y: 49.7
        },
        {
          x: "Team A",
          y: 52.8
        },
        {
          x: "Team A",
          y: 50.7
        },
        {
          x: "Team A",
          y: 45
        },
        {
          x: "Team A",
          y: 47.6
        },
        {
          x: "Team A",
          y: 55.1
        },
        {
          x: "Team A",
          y: 33.7
        },
        {
          x: "Team A",
          y: 53.2
        },
        {
          x: "Team A",
          y: 35.8
        },
        {
          x: "Team A",
          y: 31.9
        },
        {
          x: "Team A",
          y: 37.6
        },
        {
          x: "Team A",
          y: 45.9
        },
        {
          x: "Team A",
          y: 45.4
        },
        {
          x: "Team A",
          y: 46.3
        },
        {
          x: "Team A",
          y: 71.6
        },
        {
          x: "Team A",
          y: 38.2
        },
        {
          x: "Team A",
          y: 52.1
        },
        {
          x: "Team A",
          y: 44.6
        },
        {
          x: "Team B",
          y: 43.4
        },
        {
          x: "Team B",
          y: 52.2
        },
        {
          x: "Team B",
          y: 56.6
        },
        {
          x: "Team B",
          y: 70.1
        },
        {
          x: "Team B",
          y: 73.6
        },
        {
          x: "Team B",
          y: 55.3
        },
        {
          x: "Team B",
          y: 68.8
        },
        {
          x: "Team B",
          y: 55
        },
        {
          x: "Team B",
          y: 54.2
        },
        {
          x: "Team B",
          y: 44.1
        },
        {
          x: "Team B",
          y: 58
        },
        {
          x: "Team B",
          y: 54.7
        },
        {
          x: "Team B",
          y: 70.2
        },
        {
          x: "Team B",
          y: 55
        },
        {
          x: "Team B",
          y: 62.2
        },
        {
          x: "Team B",
          y: 68.7
        },
        {
          x: "Team B",
          y: 66.4
        },
        {
          x: "Team B",
          y: 44.1
        },
        {
          x: "Team B",
          y: 62
        },
        {
          x: "Team B",
          y: 53.6
        },
        {
          x: "Team B",
          y: 57.4
        },
        {
          x: "Team B",
          y: 43.3
        },
        {
          x: "Team B",
          y: 64
        },
        {
          x: "Team B",
          y: 60.2
        },
        {
          x: "Team C",
          y: 69.1
        },
        {
          x: "Team C",
          y: 66
        },
        {
          x: "Team C",
          y: 73.3
        },
        {
          x: "Team C",
          y: 48.9
        },
        {
          x: "Team C",
          y: 67
        },
        {
          x: "Team C",
          y: 58.1
        },
        {
          x: "Team C",
          y: 68.8
        },
        {
          x: "Team C",
          y: 61.6
        },
        {
          x: "Team C",
          y: 74.2
        },
        {
          x: "Team C",
          y: 66.4
        },
        {
          x: "Team C",
          y: 78.7
        },
        {
          x: "Team C",
          y: 65.6
        },
        {
          x: "Team C",
          y: 58.9
        },
        {
          x: "Team C",
          y: 71.5
        },
        {
          x: "Team C",
          y: 65.4
        },
        {
          x: "Team C",
          y: 65.4
        },
        {
          x: "Team C",
          y: 51.9
        },
        {
          x: "Team C",
          y: 56.6
        },
        {
          x: "Team C",
          y: 67.4
        },
        {
          x: "Team C",
          y: 63.8
        },
        {
          x: "Team C",
          y: 70.2
        },
        {
          x: "Team C",
          y: 59.8
        },
        {
          x: "Team C",
          y: 50.8
        },
        {
          x: "Team C",
          y: 80.6
        }
      ]
    }
  ],
  plotOptions: {
    boxPlot: {
      wcc: {
        jitter: 0.6
      }
    }
  },
  markers: {
    size: 3,
    strokeWidth: 0,
    fillOpacity: 0.6
  },
  colors: ["#2563eb", "#0f172a"],
  tooltip: {
    shared: false,
    intersect: true
  },
  title: {
    text: "Story points per sprint"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render()
```

## Verify

- Text check (Library 1.1.5): load `west-coast-charts/agent/describe` and call `chart.describe({ format: "json" })` for the actual drawn state. The live reader is on this example’s HTML page.
- Command line (Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm, https://westcoast-charts.com/docs/cli/index.md): `wcc chart export boxplot-boxplot-with-points.json --out boxplot-boxplot-with-points.svg --with-table` (save the options above as JSON first)
