JSFiddle - React, Tailwind, and code Playground
by Mike Rawling
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; max-width: 800px; height: 200px; margin: 50px auto"></div>
CSS
/*
body {
font-family: 'Open Sans', san-serif;
font-size: 32px;
}
div.callout {
height: 20px;
width: 200px;
z-index: 1;
}
div.callout {
background-color: #444;
background-image: -moz-linear-gradient(top, #444, #444);
position: relative;
color: #ccc;
padding: 10px;
border-radius: 3px;
box-shadow: 0px 0px 20px #999;
margin: 25px;
min-height: 20px;
border: 1px solid #333;
text-shadow: 0 0 1px #000;
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.callout::before {
content: "";
width: 0px;
height: 0px;
border: 0.8em solid transparent;
position: absolute;
}
.callout.top::before {
left: 45%;
bottom: -20px;
border-top: 11px solid #444;
}
.callout.bottom::before {
left: 45%;
top: -20px;
border-bottom: 10px solid #444;
}
.callout.left::before {
right: -20px;
top: 40%;
border-left: 10px solid #444;
}
.callout.right::before {
left: -20px;
top: 40%;
border-right: 10px solid #444;
}
.callout.top-left::before {
left: 7px;
bottom: -20px;
border-top: 10px solid #444;
}
.callout.top-right::before {
right: 7px;
bottom: -20px;
border-top: 10px solid #444;
}
*/
JavaScript
$(function () {
$('#container').highcharts({
colors: ['#222121', '#fac000', '#aaa'],
chart: {
type: 'area'
},
tooltip: {
backgroundColor: "#fff",
borderWidth: "2",
borderRadius: "2",
shadow: true,
useHTML: true,
style: {
padding: "10px"
}
},
title: {
text: 'semi-transparent tooltips'
},
xAxis: {
categories: [
"20 June 2016",
"21 June 2016",
"22 June 2016",
"23 June 2016"
],
},
yAxis: {
min: 0,
title: {
text: 'Imps'
}
},
legend: {
reversed: true
},
plotOptions: {
series: {
stacking: 'normal',
}
},
series: [{
name: 'Managed',
data: [117144,
61913,
89342,
127679]
}, {
name: 'PMP',
data: [11269,
34822,
39640,
28663]
}, {
name: 'Ophans',
data: [5514,
22174,
34605,
22828]
}]
});
});