title: Apex Charts custom tooltips - how do I get category name and color?
body: <p>I want to create a custom tooltip in Apex Charts. Below is what is suggested in the official docs:</p>
  <pre><code>tooltip: {
    custom: function({series, seriesIndex, dataPointIndex, w}) {
      return '&lt;div class=&quot;arrow_box&quot;&gt;' +
        '&lt;span&gt;' + series[seriesIndex][dataPointIndex] + '&lt;/span&gt;' +
        '&lt;/div&gt;'
    }
  }
  </code></pre>
  <p>The tooltip above will display the value only. However, I also need information about the corresponding category name (and if possible chart color):</p>
  <p><a href="https://codepen.io/apexcharts/pen/xYqyYm" rel="nofollow noreferrer">https://codepen.io/apexcharts/pen/xYqyYm</a></p>
  <p><a href="https://i.stack.imgur.com/G7O9v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G7O9v.png" alt="enter image description here" /></a></p>
  <p>I bet this info is somwhere in <code>w.globals</code> but I failed to find it there (expesially given it's a recursive object which returns <code>[Object Object]</code> when you try to copy it from the console).</p>