JSFiddle - React, Tailwind, and code Playground
by Danielle Parkinson
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://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: ' ',
x: -20 //center
},
subtitle: {
text: ' ',
x: -20
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: ' '
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'middle',
borderWidth: 0
},
series: [{
name: 'Target',
data: [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60],
dashStyle: 'shortdash',
color: 'red'
},
{
name: 'Staff knowledge',
data: [58.9, 58.8, 58.9, 58.8, 58.9, 58.8, 58.6, 58, 58.2, 58.4, 58.8, 58.9],
color: '#007c92'
},
]);