Donut drilldown

Click a slice to see its breakdown; the breadcrumb goes back.

Chart type
Donut donut
Tier
Free Core
Collection
Pie & donut
Render
Live, site theme
View .md Agent setup
LIVE/pie/donut-with-drilldown10 of 10 in Pie

Configuration

Raw Standalone
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "donut",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Revenue",
      data: [
        {
          x: "Hardware",
          y: 48,
          drilldown: "Hardware"
        },
        {
          x: "Software",
          y: 32,
          drilldown: "Software"
        },
        {
          x: "Services",
          y: 20,
          drilldown: "Services"
        }
      ]
    }
  ],
  drilldown: {
    enabled: true,
    series: [
      {
        id: "Hardware",
        name: "Hardware revenue (M€)",
        data: [
          {
            x: "Laptops",
            y: 22
          },
          {
            x: "Phones",
            y: 16
          },
          {
            x: "Monitors",
            y: 10
          }
        ]
      },
      {
        id: "Software",
        name: "Software revenue (M€)",
        data: [
          {
            x: "Licences",
            y: 18
          },
          {
            x: "SaaS",
            y: 9
          },
          {
            x: "Add-ons",
            y: 5
          }
        ]
      },
      {
        id: "Services",
        name: "Services revenue (M€)",
        data: [
          {
            x: "Support",
            y: 12
          },
          {
            x: "Training",
            y: 8
          }
        ]
      }
    ]
  },
  legend: {
    position: "bottom"
  },
  title: {
    text: "Revenue (M€), click a slice"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

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