JSFiddle - React, Tailwind, and code Playground
by ninachroscicka
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/highcharts-more.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="height: 600px; min-width: 310px; max-width: 800px; margin: 0 auto></div>
CSS
@import url(https://fonts.googleapis.com/css?family=Raleway:400);
.highcharts-tooltip h3 {
margin: 0.3em 0;
}
JavaScript
Highcharts.chart('container', {
chart: {
type: 'bubble',
plotBorderWidth: 0,
zoomType: 'xy'
},
legend: {
enabled: false
},
title: {
text: ''
},
subtitle: {
text: ''
},
xAxis: {
lineColor: 'transparent',
gridLineWidth: 0.05,
tickLength:0,
title: {
text: 'Reakcje [%]'
},
labels: {
format: '{value} %'
},
plotLines: [{
color: '#f2f2f2',
dashStyle: "ShortDot",
width: 1,
value: 65,
label: {
rotation: 0,
y: 15,
style: {
fontStyle: 'italic'
}
},
zIndex: 3
}]
},
yAxis: {
gridLineColor:'transparent',
startOnTick: false,
endOnTick: false,
tickLength:0,
title: {
text: 'Wystąpienia [%]'
},
labels: {
format: '{value} %'
}
},
tooltip: {
useHTML: true,
headerFormat: '<table>',
pointFormat: '<tr><th colspan="2"><h3>{point.name}</h3></th></tr>' +
'<tr><th>Reakcje [%]</th><td>{point.x}</td></tr>' +
'<tr><th>Wystąpienia [%]</th><td>{point.y}</td></tr>',
footerFormat: '</table>',
followPointer: true
},
plotOptions: {
plotLines: [{
color: '#fff'}],
series: {
dataLabels: {
enabled: true,
format: '{point.name}',
color: '#3e3e3e',
style: {
textOutline: false,
fontSize: "10px",
fontfamily: 'Raleway'
}
}
}
},
series: [{
data:...