JSFiddle - React, Tailwind, and code Playground
by Aman Adhikari
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
title: {
text: 'Bill unit trending with Average',
x: -20 //center
},
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: [
'7/1/2013',
'8/1/2013',
'9/1/2013',
'10/1/2013',
'11/1/2013',
'12/1/2013',
'1/1/2014',
'2/1/2014',
'3/1/2014',
'4/1/2014',
'5/1/2014',
'6/1/2014',
'7/1/2014']
},
yAxis: {
title: {
text: 'Service Coordination'
},
plotLines: [{
color: 'red',
value: '15', // Insert your average here
width: '1',
zIndex: 2 // To not get stuck below the regular plot lines
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Tokyo',
data: [210, 189, 152, 199, 223, 200, 225, 286, 312, 295, 277, 297, 283]
}]
});
});