JSFiddle - React, Tailwind, and code Playground
by zumwalt
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: 400px; height: 400px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'line',
marginRight: 0,
marginBottom: 25
},
colors: [
'#ee7b4b',
'#0d233a',
'#8bbc21',
'#910000',
'#1aadce',
'#492970',
'#f28f43',
'#77a1e5',
'#c42525',
'#a6c96a'
],
title: {
text: 'Income Forecast',
x: -20 //center
},
credits: {
enabled: false
},
subtitle: {
text: '',
x: -20
},
xAxis: {
categories: ['Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep']
},
yAxis: {
title: {
text: ''
},
plotLines: [{
value: 0,
width: 1,
color: '#808080'
}]
},
tooltip: {
valueSuffix: '°C'
},
legend: {
enabled: false,
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -10,
y: 100,
borderWidth: 0
},
series: [{
name: 'Income',
data: [2600, 3194, 2395, 5132, 4355, 3560],
dataLabels: {
enabled: true,
formatter: function() {
return '$'+ Highcharts.numberFormat(this.y, 0);
}
}
}]
});
});