Highcharts Demo

author(s): Torstein Hønsi

by fekkyDev s

HTML

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

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

JavaScript

Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Monthly Average Rainfall'
    },
    subtitle: {
        text: 'Source: WorldClimate.com'
    },
    xAxis: {
     type: 'datetime',
                                dateTimeLabelFormats: {
                                    day: chartData[0].fmts
                                },
        categories: [
            'Jan',
            'Feb',
            'Mar',
            'Apr',
            'May',
            'Jun',
            'Jul',
            'Aug',
            'Sep',
            'Oct',
            'Nov',
            'Dec'
        ],
        crosshair: true
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Rainfall (mm)'
        }
    },
    tooltip: {
        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
            '<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
        footerFormat: '</table>',
        shared: true,
        useHTML: true
    },
    plotOptions: {
        column: {
            pointPadding: 0.2,
            borderWidth: 0
        }
    },
    series: [{
				"name": "2.0000",
				"legendName": "2.0000",
				"lineWidth": 2,
				"isThresholdLine": false,
				"dashStyle": "line",
				"cursor": "",
				"smoothed": true,
				"marker": {
					"states": {
						"hover": {
							"enabled": true
						}
					},
					"enabled": false
				},
				"color": "#3e48bb",
				"data": [
					[1555320300000, 1, "04/15/2019 14:55:00|1"]
				]
			}, {
				"name": "1.0000",
				"legendName": "1.0000",
				"lineWidth": 2,
				"isThresholdLine": false,
				"dashStyle": "line",
				"cursor": "",
				"smoothed": true,
				"marker": {
					"states": {
						"hover": {
							"enabled": true
						}
					},
					"enabled": false
				},
				"color": "#ea4052",
				"data": [
					[1555319820000, 2, "04/15/2019...