Highcharts Demo

author(s): Torstein Hønsi

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container"></div>

CSS

@import 'https://code.highcharts.com/css/highcharts.css';

.highcharts-axis-title {
  width: 200px;
  white-space: normal !important;
}

#container {
  height: 400px;
  max-width: 800px;
  margin: 0 auto;
}

.highcharts-plot-band-label {
  font-size: 30px
}

JavaScript

Highcharts.chart('container', {

  chart: {
    styledMode: true,
    type: 'line'
  },

  title: {
    text: 'How to control line heigh for plot band label without using useHTML?'
  },
  
  xAxis: {
    plotBands: {
      from: 1,
      to: 2,
      label: {
				text: 'test <br>label',
        // doesn't persist in downloaded png
        // useHTML: true, 
        style: {
        	lineHeight: 30
        }
        }
       
    }
  },


  series: [{
    data: [1, 3, 2, 4]
  }, {
    data: [324, 124, 547, 221],
  }]

});