var options = {
  series: [576, 168, 42, 34],
  chart: {
    type: 'unit',
    height: 420,
    animations: {
      enabled: true,
      speed: 900,
    },
  },
  labels: ['Available', 'Reserved', 'Charging', 'Critical'],
  colors: ['#00A96E', '#0EB8C4', '#FFAB00', '#FF4560'],
  plotOptions: {
    unit: {
      layout: 'custom',
      // One of the shapes in apexcharts/unit-shapes.
      positions: 'battery',
      transition: 'flow',
      clusterLabels: {
        show: false,
      },
    },
  },
  legend: {
    position: 'bottom',
  },
}

var chart = new ApexCharts(document.querySelector('#chart'), options)
chart.render()
Battery Storage - JavaScript Unit Charts | ApexCharts.js | ApexCharts.js