# Streamgraph, expanded (Streamgraph example)

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

Share of total (0–100%) instead of absolute values.

- Chart type: `streamgraph` (Streamgraph)
- Collection: Streamgraph · Streamgraph
- Raw configuration: https://westcoast-charts.com/gallery-src/streamgraph/streamgraph-expand.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/streamgraph/streamgraph-expand.html

## Setup

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

WestCoastCharts.use(types)
```

## Options

```js
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "streamgraph",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Email",
      data: [
        [1735689600000, 10],
        [1736294400000, 6],
        [1736899200000, 17],
        [1737504000000, 29],
        [1738108800000, 22],
        [1738713600000, 28],
        [1739318400000, 22],
        [1739923200000, 8],
        [1740528000000, 22],
        [1741132800000, 8],
        [1741737600000, 13],
        [1742342400000, 30],
        [1742947200000, 29],
        [1743552000000, 7],
        [1744156800000, 15],
        [1744761600000, 5],
        [1745366400000, 18],
        [1745971200000, 7],
        [1746576000000, 11],
        [1747180800000, 15]
      ]
    },
    {
      name: "Chat",
      data: [
        [1735689600000, 10],
        [1736294400000, 26],
        [1736899200000, 14],
        [1737504000000, 26],
        [1738108800000, 7],
        [1738713600000, 9],
        [1739318400000, 10],
        [1739923200000, 12],
        [1740528000000, 21],
        [1741132800000, 5],
        [1741737600000, 7],
        [1742342400000, 12],
        [1742947200000, 22],
        [1743552000000, 16],
        [1744156800000, 19],
        [1744761600000, 15],
        [1745366400000, 25],
        [1745971200000, 16],
        [1746576000000, 22],
        [1747180800000, 21]
      ]
    },
    {
      name: "Phone",
      data: [
        [1735689600000, 22],
        [1736294400000, 21],
        [1736899200000, 13],
        [1737504000000, 12],
        [1738108800000, 15],
        [1738713600000, 7],
        [1739318400000, 20],
        [1739923200000, 14],
        [1740528000000, 15],
        [1741132800000, 21],
        [1741737600000, 6],
        [1742342400000, 18],
        [1742947200000, 22],
        [1743552000000, 22],
        [1744156800000, 13],
        [1744761600000, 22],
        [1745366400000, 10],
        [1745971200000, 7],
        [1746576000000, 18],
        [1747180800000, 16]
      ]
    },
    {
      name: "Forum",
      data: [
        [1735689600000, 15],
        [1736294400000, 9],
        [1736899200000, 7],
        [1737504000000, 17],
        [1738108800000, 14],
        [1738713600000, 5],
        [1739318400000, 11],
        [1739923200000, 8],
        [1740528000000, 13],
        [1741132800000, 8],
        [1741737600000, 12],
        [1742342400000, 11],
        [1742947200000, 15],
        [1743552000000, 13],
        [1744156800000, 7],
        [1744761600000, 8],
        [1745366400000, 7],
        [1745971200000, 11],
        [1746576000000, 10],
        [1747180800000, 18]
      ]
    }
  ],
  xaxis: {
    type: "datetime"
  },
  plotOptions: {
    streamgraph: {
      offset: "expand"
    }
  },
  title: {
    text: "Support contacts by channel (share)"
  },
  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 streamgraph-streamgraph-expand.json --out streamgraph-streamgraph-expand.svg --with-table` (save the options above as JSON first)
