Highcharts Demo

author(s): Torstein Hønsi

by Nhi Nguyen

HTML

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

<div id="container" style="height: 400px"></div>

CSS

/* #container .highcharts-container .highcharts-subtitle {
  width:calc(100% + -120px); customize this to your needs
} */

JavaScript

Highcharts.chart('container', {

    title: {
        floating: true,
        align: 'left',
        x: 100,
        y: 40
    },

    subtitle: {
        text: '<b>This is</b>&nbsp;&nbsp;&nbsp;&nbsp;<span>middle</span><span style="float : right !important;text-align: center !important;">the subtitle</span>',
        /* floating: true, */
        /* align: 'left', */
        x: 100,
        y: 60,
        useHTML : true
    },

    xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
    },

    series: [{
        data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
    }]
});