Highcharts Demo
author(s):
Torstein Hønsi
HTML
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 800px; margin: 0 auto"></div>
JavaScript
Highcharts.chart('container', {
chart: {
type: 'scatter'
},
title: {
text: null
},
xAxis: {
title: {
enabled: true,
text: null
},
},
yAxis: {
title: {
text: null
}
},
tooltip: {
formatter: function() {
return false;
}
},
plotOptions: {
scatter: {
marker: {
radius: 0,
states: {
hover: {
enabled: false,
}
}
},
dataLabels: {
enabled: true,
borderRadius: 5,
backgroundColor: 'rgba(252, 255, 197, 0.7)',
borderWidth: 1,
borderColor: '#AAA',
y: -6,
formatter: function() {
var s = this.point.name;
return s;
}
},
states: {
hover: {
marker: {
enabled: false
}
}
},
}
},
series: [{
name: 'Chord',
color: 'rgba(0, 0, 0, 0)',
showInLegend: false,
data: [{
x: 0,
y: 50,
name: 'D'
}, {
x: 2,
y: 50,
name: 'A'
}, {
x: 3,
y: 50,
name: 'G'
}, {
x: 4,
y: 50,
name: 'D'
}, {
x: 5,
y: 50,
name: 'G'
}, {
x: 6,
y: 50,
name: 'F'
}]
}]
});