JSFiddle - React, Tailwind, and code Playground
by Rahul Roy
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({
chart: {
inverted: true
},
title: {
text: 'Atmosphere Temperature by Altitude'
},
subtitle: {
text: 'According to the Standard Atmosphere Model'
},
xAxis: [{
reversed: false,
title: {
enabled: true,
text: 'Altitude'
},
labels: {
formatter: function() {
return this.value +'km';
}
},
maxPadding: 0.05,
showLastLabel: true
},{
categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
}],
yAxis: [{
reversed: false,
title: {
text: 'Temperature'
},
labels: {
formatter: function() {
return this.value + '°';
}
},
lineWidth: 2
},{
min: 0,
title: {
text: 'Total fruit consumption'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
}],
legend: {
enabled: false
},
tooltip: {
headerFormat: '<b>{series.name}</b><br/>',
pointFormat: '{point.x} km: {point.y}°C'
},
series: [{
name: 'Temperature1',type: 'spline',xAxis:0,yAxis:0,
data:...