TitleAndSubtitle

by kzoon

HTML

<script src="http://highcharts.com/js/testing.js"></script>
<div id="container" style=" height:400px; border: 1px solid black;"></div>

JavaScript

var marginTopCorrection = 11; //default 1, 11 for tight margin 

var titleFontSize = 16; //default 16
var subTitleFontSize = 12;//default 12

var yTitle = titleFontSize-marginTopCorrection ;//default 15
var ySubTitle = yTitle + subTitleFontSize + 3 ; //default 40

var chart = new Highcharts.Chart({
    credits: {
        enabled: false
},


    chart: {
        renderTo: 'container',
        type: 'column', backgroundColor: 'yellow'
    },"title": {
        "text": "Columns",
        "style": {
            "fontFamily": "'Lucida Grande', 'Lucida Sans Unicode'",
            "fontSize": "12pt",
            "fontWeight": "normal",
            "colorIE": "rgb(109,134,159)",
            "color": "rgba(109,134,159,1)"
        }
    },
    "subtitle": {
        "text": "TotChannel, Sales, Australia",
        "style": {
            "fontFamily": "'Lucida Grande', 'Lucida Sans Unicode'",
            "fontSize": "10pt",
            "fontWeight": "normal",
            "colorIE": "rgb(109,134,159)",
            "color": "rgba(109,134,159,1)"
        }
    },
    "legend": {
        "margin": 10,
        "backgroundColorIE": "rgb(255,255,255)",
        "backgroundColor": "rgba(255,255,255,0)",
        "itemStyle": {
            "fontFamily": "'Lucida Grande', 'Lucida Sans Unicode'",
            "fontSize": "8pt",
            "colorIE": "rgb(102,102,102)",
            "color": "rgba(102,102,102,1)"
        }
    },
    "tooltip": {
        "enabled": true,
        "style": {
            "fontFamily": "'Lucida Grande', 'Lucida Sans Unicode'",
            "fontSize": "8pt",
            "colorIE": "rgb(102,102,102)",
            "color": "rgba(102,102,102,1)"
        }
    },
    "plotOptions": {
        "column": {
            "animation": false,
            "shadow": false,
            "stickyTracking": false,
            "zIndex": 1,
            "dataLabels": {
                "enabled": false
            },
            "scTooltipFormat": {
                "category": {
      ...