JSFiddle - React, Tailwind, and code Playground
by tannm
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: '',
x: -20 //center
},
xAxis: {
labels: {
enabled: true
},
plotLines: [{
color: '#FF0000',
width: 30,
value: 5.5,
zIndex:1
}]
},
yAxis: {
plotLines: [{
value: 0,
width: 1,
color: '#FF0000'
}]
},
tooltip: {
},
legend: {
layout: 'vertical',
align: 'top',
verticalAlign: 'top',
borderWidth: 0
},
series: [{
name: 'Share1',
data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6]
}]
}, function(chart) { // on complete
chart.renderer.image('http://highcharts.com/demo/gfx/sun.png', chart.chartWidth/2-10, 100, 80, 80)
.attr({
zIndex: 2
})
.add();
chart.renderer.rect(chart.chartWidth/2, 0, chart.plotLeft - 7, chart.chartHeight)
.attr({
fill: '#11FF11',
zIndex: 1
})
.add();
});
});