Async drilldown

Drilling loads the next level asynchronously; a loading bar shows while it arrives.

Chart type
Bar bar
Tier
Free Core
Collection
Drilldown
Render
Live, site theme
View .md Agent setup
LIVE/drilldown/column-drilldown-async4 of 10 in Drilldown

Configuration

Raw Standalone
const options = {
  chart: {
    height: 380,
    fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
    type: "bar",
    toolbar: {
      show: false
    }
  },
  series: [
    {
      name: "Sales",
      data: [
        {
          x: "Hardware",
          y: 320,
          drilldown: "Hardware"
        },
        {
          x: "Software",
          y: 540,
          drilldown: "Software"
        },
        {
          x: "Services",
          y: 210,
          drilldown: "Services"
        }
      ]
    }
  ],
  plotOptions: {
    bar: {
      borderRadius: 4,
      columnWidth: "45%"
    }
  },
  dataLabels: {
    enabled: false
  },
  drilldown: {
    enabled: true,
    onDrillDown: ({ id }) => fetchLevel(id)
  },
  title: {
    text: "Sales by division (click to load)"
  },
  theme: {
    mode: "light",
    preset: "coastal"
  }
}

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