# Panel promotion (Trellis example)

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

Click a panel header to expand it; Esc or the header again restores the grid.

- Chart type: `line` (Line)
- Collection: Trellis · Trellis
- Raw configuration: https://westcoast-charts.com/gallery-src/trellis/panel-promotion.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/trellis/panel-promotion.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import trellis from 'west-coast-charts/features/trellis'

WestCoastCharts.use(types).use(trellis)
```

## Options

```js
const options = {
  chart: {
    height: "auto",
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "line",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Visitors k",
      city: "Lisbon",
      data: [58, 58, 58, 58, 58, 60, 61, 63, 65, 68, 69, 71, 72, 73, 72, 73, 72, 72, 73, 71, 73, 76, 76, 77, 77, 76, 77, 78, 77, 79]
    },
    {
      name: "Visitors k",
      city: "Oslo",
      data: [60, 61, 63, 64, 63, 63, 63, 61, 60, 60, 62, 65, 68, 66, 63, 62, 61, 61, 63, 64, 63, 65, 66, 68, 68, 71, 73, 71, 70, 70]
    },
    {
      name: "Visitors k",
      city: "Seattle",
      data: [59, 59, 56, 54, 55, 55, 58, 59, 60, 60, 60, 63, 63, 64, 63, 64, 67, 69, 68, 66, 66, 66, 66, 64, 63, 64, 66, 69, 71, 71]
    },
    {
      name: "Visitors k",
      city: "Osaka",
      data: [60, 62, 60, 62, 62, 61, 62, 60, 57, 60, 58, 60, 60, 60, 61, 62, 64, 63, 66, 66, 68, 70, 72, 71, 74, 75, 76, 76, 75, 75]
    },
    {
      name: "Visitors k",
      city: "Austin",
      data: [60, 58, 58, 59, 57, 55, 52, 55, 54, 52, 52, 54, 56, 56, 57, 55, 54, 54, 51, 49, 52, 50, 52, 52, 51, 49, 47, 50, 51, 51]
    },
    {
      name: "Visitors k",
      city: "Porto",
      data: [59, 60, 63, 64, 67, 69, 68, 67, 65, 68, 71, 73, 72, 75, 76, 78, 76, 77, 78, 81, 81, 81, 82, 80, 82, 83, 86, 86, 89, 89]
    },
    {
      name: "Visitors k",
      city: "Tallinn",
      data: [58, 56, 55, 54, 53, 54, 53, 55, 55, 56, 56, 57, 55, 52, 54, 55, 58, 60, 57, 56, 57, 58, 57, 59, 60, 62, 62, 63, 62, 65]
    },
    {
      name: "Visitors k",
      city: "Lyon",
      data: [58, 58, 61, 59, 59, 58, 55, 53, 54, 52, 50, 53, 55, 53, 51, 51, 49, 51, 49, 49, 46, 45, 47, 50, 50, 50, 49, 47, 49, 46]
    }
  ],
  stroke: {
    width: 2
  },
  xaxis: {
    labels: {
      show: false
    }
  },
  dataLabels: {
    enabled: false
  },
  trellis: {
    by: "city",
    columns: 4,
    aspectRatio: 1.6,
    promote: true,
    legend: "none"
  },
  title: {
    text: "Daily visitors by city"
  },
  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 trellis-panel-promotion.json --out trellis-panel-promotion.svg --with-table` (save the options above as JSON first)
