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: {
type: 'scatter',
zoomType: 'xy'
},
title: {
text: 'Height Versus Weight of 507 Individuals by Gender'
},
subtitle: {
text: 'Source: Heinz 2003'
},
xAxis: {
title: {
enabled: true,
text: 'Height (cm)'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true
},
yAxis: {
title: {
text: 'Weight (kg)'
}
},
legend: {
layout: 'vertical',
align: 'left',
verticalAlign: 'top',
x: 100,
y: 70,
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF',
borderWidth: 1
},
plotOptions: {
scatter: {
marker: {
radius: 5,
text:"Hello"
}
}
},
series: [{
name: 'Fem',
color: 'rgba(223, 83, 83, .5)',
data: [[161.9, 51.9]],
dataLabels: {
enabled: true,
allowOverlap:false,
align: 'left',
x:2,
y:15
}
}, {
name: 'Male',
color: 'rgba(119, 152, 191, .5)',
data: [[162, 52]],
dataLabels: {
enabled: true,
allowOverlap:false,
align: 'left',
x:2,
y:15
}
}]
});
});