'How to place the Y-axis label vertically center align in apexcharts?

I want to place Y-axis label vertically center in my ReactJS requirement, so I tried with align: 'center' and also with verticalAlignment: 'center' under y-axis label but I am unable to get the expected output. Is there any other way to achieve this requirement?



Solution 1:[1]

The only way that I found to do that is to get the max value in your series

series: [{
  data: [0, 24, 10,30]
}],

And set it yaxis the min and the max to be that max value. In that example 30

yaxis: {
  min: -30,
  max: 30,
},

This will make the 0 of the yaxis centered

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vladislav Stoitsov