# Multiple y axes (Mixed example)

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

Three measures with three coloured y axes.

- Chart type: `line` (Line)
- Collection: Mixed · Mixed / combo
- Raw configuration: https://westcoast-charts.com/gallery-src/mixed/multiple-yaxes.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/mixed/multiple-yaxes.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
    }
  },
  colors: ["#2563eb", "#0d9488", "#d97706"],
  series: [
    {
      name: "Orders",
      type: "column",
      data: [1034, 1338, 1004, 1403, 1481, 826, 1492, 922, 987, 890]
    },
    {
      name: "Basket €",
      type: "column",
      data: [43, 43, 50, 59, 42, 51, 53, 69, 51, 63]
    },
    {
      name: "Return rate %",
      type: "line",
      data: [5.8, 5.9, 6.1, 6.1, 5.9, 6.4, 6.6, 6.2, 5.8, 5.2]
    }
  ],
  stroke: {
    width: [0, 0, 3]
  },
  xaxis: {
    categories: ["W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8", "W9", "W10"]
  },
  yaxis: [
    {
      seriesName: "Orders",
      axisBorder: {
        show: true,
        color: "#2563eb"
      },
      labels: {
        style: {
          colors: "#2563eb"
        }
      },
      title: {
        text: "Orders",
        style: {
          color: "#2563eb"
        }
      }
    },
    {
      seriesName: "Basket €",
      opposite: true,
      axisBorder: {
        show: true,
        color: "#0d9488"
      },
      labels: {
        style: {
          colors: "#0d9488"
        }
      },
      title: {
        text: "Basket €",
        style: {
          color: "#0d9488"
        }
      }
    },
    {
      seriesName: "Return rate %",
      opposite: true,
      axisBorder: {
        show: true,
        color: "#d97706"
      },
      labels: {
        style: {
          colors: "#d97706"
        }
      },
      title: {
        text: "Return %",
        style: {
          color: "#d97706"
        }
      }
    }
  ],
  dataLabels: {
    enabled: false
  },
  title: {
    text: "Shop KPIs by week"
  },
  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-multiple-yaxes.json --out mixed-multiple-yaxes.svg --with-table` (save the options above as JSON first)
