Highcharts Demo

author(s): Torstein Hønsi

by Christian Sonne

HTML

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

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

CSS

#container {
	min-width: 320px;
	height: 400px;
	margin: 0 auto;
}

JavaScript

Highcharts.chart('container', {
		credits: {enabled: false},
    chart: {
    },
    plotOptions: {
    	series: {
      	marker: {
        	enabled: false
        }
      }
    },
    title: {
        text: 'Indoor',
        align: 'left'
    },
    xAxis: [{
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        crosshair: true
    }],
    yAxis: [{ // Primary yAxis
        labels: {
            style: {
                color: Highcharts.getOptions().colors[0],
                fontWeight: 'bold'
            }
        },
        title: {
            text: undefined
        }

    }, { // Secondary yAxis
        gridLineWidth: 0,
        title: {
            text: undefined,
        },
        labels: {
            style: {
                color: Highcharts.getOptions().colors[1],
                fontWeight: 'bold'
            }
        },

    }, { // Tertiary yAxis
        gridLineWidth: 0,
        title: {
            text: undefined
        },
        labels: {
            style: {
                color: Highcharts.getOptions().colors[2],
                fontWeight: 'bold'
            }
        },
    }],
    tooltip: {
        shared: true
    },
    legend: {
    },
    series: [{
        name: 'Rainfall (mm)',
        type: 'spline',
        data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
        tooltip: {
            valueSuffix: ' mm'
        },

    }, {
        name: 'Sea-Level Pressure (mb)',
        type: 'spline',
        yAxis: 1,
        data: [1016, 1016, 1015.9, 1015.5, 1012.3, 1009.5, 1009.6, 1010.2, 1013.1, 1016.9, 1018.2, 1016.7],
        marker: {
            enabled: false
        },
        dashStyle: 'shortdot',
        tooltip: {
            valueSuffix: ' mb'
        },

    }, {
        name: 'Temperature (℃)',
				yAxis: 2,
        type: 'spline',
        data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9,...