title: Apex Chart - display date in tooltip
body: <p>Using Apex Charts, how can I display the date of the current highlighted bar in a custom tooltip? For example in this screenshot, I want to display &quot;Jun 2020&quot; instead of the hardcoded &quot;Month&quot; string. So i'm looking for the X axis categories labels, but I don't understand how to display it in the tooltip.</p>
  <p><a href="https://i.stack.imgur.com/OVlrP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OVlrP.png" alt="" /></a></p>
  <pre><code>  series: [{
      name: 'Month',
      data: [&lt;?= $data ?&gt;]
    }],          
    xaxis: {
      categories: [&lt;?= $labels ?&gt;],
      labels: {
        rotateAlways: true,
      }
    },
    tooltip: {
      y: {
        formatter: function (val) {
          return val + &quot; products sold&quot;
        }
      }
    },
  </code></pre>