JSFiddle - React, Tailwind, and code Playground
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 () {
(function (H) {
H.wrap(H.seriesTypes.spline.prototype, 'drawPoints', function (p) {
p.call(this);
var self = this,
r = this.chart.renderer,
attrs = {
'stroke-width': 1,
stroke: 'black',
'stroke-dasharray': '2'
};
this.customLines = this.customLines || [];
if (self.customLines.length > 0) {
H.each(self.customLines, function (e, i) {
e.destroy();
});
}
H.each(self.points, function(e, i) {
self.customLines.push(
r.path(['M', e.plotX, e.plotY, 'L', e.plotX, self.chart.chartWidth - self.chart.plotLeft - 10]).attr(attrs).add(self.markerGroup)
);
});
});
})(Highcharts);
$('#container').highcharts({
chart: {
type: 'spline',
inverted: true
},
title: {
text: 'Monthly Average Temperature'
},
subtitle: {
text: 'Source: WorldClimate.com'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
yAxis: {
title: {
text: 'Temperature'
},
labels: {
formatter: function () {
return this.value + '°';
}
}
},
tooltip: {
crosshairs: true,
shared: true
},
plotOptions: {
spline: {
marker: {
radius: 4,
lineColor: '#666666',
lineWidth: 1
}
}
},
yAxis: {
gridLineWidth: 0
},
...