Department by quarter

Tidy rows (department, quarter, spend) become one column panel per department.

Chart type
Bar bar
Tier
Free Core
Collection
Trellis
Render
Live, site theme
View .md Agent setup
LIVE/trellis/trellis-department-by-quarter16 of 27 in Trellis

Configuration

Raw Standalone
const options = {
  chart: {
    height: "auto",
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "bar",
    toolbar: {
      show: false
    }
  },
  series: [],
  plotOptions: {
    bar: {
      borderRadius: 2,
      columnWidth: "55%"
    }
  },
  dataLabels: {
    enabled: false
  },
  trellis: {
    data: [
      {
        dept: "Platform",
        q: "Q1",
        spend: 37
      },
      {
        dept: "Platform",
        q: "Q2",
        spend: 54
      },
      {
        dept: "Platform",
        q: "Q3",
        spend: 62
      },
      {
        dept: "Platform",
        q: "Q4",
        spend: 77
      },
      {
        dept: "Payments",
        q: "Q1",
        spend: 67
      },
      {
        dept: "Payments",
        q: "Q2",
        spend: 46
      },
      {
        dept: "Payments",
        q: "Q3",
        spend: 70
      },
      {
        dept: "Payments",
        q: "Q4",
        spend: 42
      },
      {
        dept: "Search",
        q: "Q1",
        spend: 80
      },
      {
        dept: "Search",
        q: "Q2",
        spend: 71
      },
      {
        dept: "Search",
        q: "Q3",
        spend: 22
      },
      {
        dept: "Search",
        q: "Q4",
        spend: 62
      },
      {
        dept: "Mobile",
        q: "Q1",
        spend: 80
      },
      {
        dept: "Mobile",
        q: "Q2",
        spend: 59
      },
      {
        dept: "Mobile",
        q: "Q3",
        spend: 63
      },
      {
        dept: "Mobile",
        q: "Q4",
        spend: 27
      },
      {
        dept: "Data",
        q: "Q1",
        spend: 88
      },
      {
        dept: "Data",
        q: "Q2",
        spend: 90
      },
      {
        dept: "Data",
        q: "Q3",
        spend: 70
      },
      {
        dept: "Data",
        q: "Q4",
        spend: 71
      },
      {
        dept: "Growth",
        q: "Q1",
        spend: 49
      },
      {
        dept: "Growth",
        q: "Q2",
        spend: 34
      },
      {
        dept: "Growth",
        q: "Q3",
        spend: 67
      },
      {
        dept: "Growth",
        q: "Q4",
        spend: 36
      }
    ],
    by: "dept",
    x: "q",
    y: "spend",
    columns: 3,
    aspectRatio: 1.8,
    legend: "none"
  },
  title: {
    text: "Spend per quarter (k€)"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()