# Line and column (Mixed example)

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

Revenue columns with a margin line on a second axis.

- Chart type: `line` (Line)
- Collection: Mixed · Mixed / combo
- Raw configuration: https://westcoast-charts.com/gallery-src/mixed/line-column.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/mixed/line-column.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: "Revenue k€",
      type: "column",
      data: [547, 314, 535, 384, 456, 435, 378, 423, 373, 405, 383, 331]
    },
    {
      name: "Margin %",
      type: "line",
      data: [31.2, 29.4, 30.3, 29.1, 27.9, 27.4, 27.5, 26, 27.7, 28.5, 27.1, 27.2]
    }
  ],
  stroke: {
    width: [0, 3]
  },
  xaxis: {
    categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
  },
  yaxis: [
    {
      title: {
        text: "Revenue k€"
      }
    },
    {
      opposite: true,
      title: {
        text: "Margin %"
      }
    }
  ],
  dataLabels: {
    enabled: true,
    enabledOnSeries: [1]
  },
  title: {
    text: "Revenue and margin"
  },
  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-column.json --out mixed-line-column.svg --with-table` (save the options above as JSON first)
