Search code examples
apexcharts

ApexCharts: set display boolean of one specific y axis tooltip


I am working with a Multi Axis line chart by ApexCharts.js.

What I want to do

I have multiple y axes and some series share the same y axis. Since there is no y axis ID, you have to create a y axis for every series matching the index of the series. That's why the last y axis is not shown - but its tooltip is still shown (as seen in the following picture). I want to hide the tooltip for that y axis since the y axis itself is also hidden.

chart y axis tooltip

I tried to set the tooltip.enabled property for each y axis but that didn't seem to work for individual y axes:

yaxis: [{
seriesName: 'TEAM A',
showAlways: true,
title: {
  text: 'A-Axis'
},
tooltip: {
  enabled: true
}}]

https://codepen.io/niklhs/pen/OJyyzoa


Then I tried to set the tooltip.enabledOnSeries property:

https://codepen.io/niklhs/pen/yLYBeJb

That didn't work either unfortunately.

Any ideas?


Solution

  • For anyone running into the same issue: This is now possible with ApexCharts 3.19.0. Just update the ApexCharts dependency and you‘re good to go with the following solution:

    tooltip: {
      enabled: false
    }
    

    Full code example: https://codepen.io/niklhs/pen/PoPWvWz