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; max-width: 800px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
width: 500,
height: 500,
type: 'scatter',
zoomType: 'xy'
},
title: {
text: 'Bottom vs. Top Decile Students by Ethnicity'
},
subtitle: {
text: 'Source: NZ Ministry of Education, 2015'
},
xAxis: {
min: 0,
max: 80,
title: {
enabled: true,
text: 'Bottom Decile (%)'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true
},
yAxis: {
min: 0,
max: 80,
title: {
text: 'Top Decile (%)'
}
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 350,
y: 70,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF',
borderWidth: 1
},
plotOptions: {
scatter: {
marker: {
radius: 5,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {
hover: {
marker: {
enabled: false
}
}
},
tooltip: {
headerFormat: '<b>{series.name}</b><br>',
pointFormat: '{point.x} %, {point.y} %'
}
}
},
series: [{
name: 'Maori',
color: 'rgba(191, 197, 15, 1)',
data: [
[29, 6]
]
}, {
...