# Line and area (Mixed example)

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

An area of capacity with a line of demand.

- Chart type: `line` (Line)
- Collection: Mixed · Mixed / combo
- Raw configuration: https://westcoast-charts.com/gallery-src/mixed/line-area.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/mixed/line-area.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: "line",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Capacity",
      type: "area",
      data: [68, 69, 72, 71, 73, 70, 69, 68, 67, 64, 65, 65, 66, 69]
    },
    {
      name: "Demand",
      type: "line",
      data: [56, 51, 47, 47, 51, 50, 52, 50, 50, 47, 48, 52, 55, 54]
    }
  ],
  stroke: {
    curve: "smooth",
    width: [1, 3]
  },
  fill: {
    type: ["gradient", "solid"],
    gradient: {
      opacityFrom: 0.4,
      opacityTo: 0.05
    }
  },
  xaxis: {
    categories: ["D1", "D2", "D3", "D4", "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13", "D14"]
  },
  title: {
    text: "Warehouse capacity vs demand"
  },
  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 mixed-line-area.json --out mixed-line-area.svg --with-table` (save the options above as JSON first)
