I am trying to align the Y axis labels in the center of the plotBand but on the Y axis. Here what I have tried. I have given the label to plotBand and aligned it on Y axis. I am trying to find alternate solution that dynamically align the value on Y axis instead of setting the negative values of X inside the label.
plotBand: {
label: {
text: 'Y axis Value 1',
align: 'left',
x: -95,
style: {
color: '#333'
}
},
}
A plot-band always takes all axis width/height, so using the
xandyproperties doesn't seem to be a bad idea for positioning.However, you can access the specific plot-band in some chart's event and position it dynamically by using
attrmethod. For example:Live demo: http://jsfiddle.net/BlackLabel/gwnxfy91/
API Reference: https://api.highcharts.com/class-reference/Highcharts.SVGElement#attr