JSFiddle - React, Tailwind, and code Playground
by franzo
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-more.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="height: 400px; min-width: 310px; max-width: 600px; margin: 0 auto"></div>
JavaScript
$(function () {
$('#container').highcharts({
chart: {
type: 'bubble',
zoomType: 'xy'
},
title: {
text: 'Bubble chart, cannot get labels to start in top right quadrant.'
},
plotOptions: {
bubble: {
dataLabels: {
enabled: true,
crop: false,
color: '#000000',
style: { textShadow: 'none' },
align: 'left',
verticalAlign: 'top',
formatter: function() {
return this.point.name;
}
},
minSize: '10%',
maxSize: '30%'
}
},
series: [
{
name: 'Women',
marker: { fillColor: 'pink' },
data: [
{ name: 'Alice Pasternak', x: 3.5, y: 4, z: 5},
{ name: 'Eve Wild', x: 7, y: 7, z: 3},
{ name: 'Carol White', x: 4, y: 8, z: 6}
]
},
{
name: 'Men',
marker: { fillColor: 'lightblue' },
data: [
{ name: 'Dan', x: 4, y: 3, z: 4},
{ name: 'Bob Jones', x: 5, y: 6, z: 3},
{ name: 'Frank', x: 3, y: 2, z: 7}
]
}
]
});
});