Line and area

An area of capacity with a line of demand.

Chart type
Line line
Tier
Free Core
Collection
Mixed / combo
Render
Live, site theme
View .md Agent setup
LIVE/mixed/line-area5 of 6 in Mixed

Configuration

Raw Standalone
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)
chart.render()