Skip to content

Instantly share code, notes, and snippets.

@nilsrunde
nilsrunde / gist:14ea8da9708778ecae6143a5e8bb5ba9
Created March 29, 2018 08:19 — forked from jeremywrowe/gist:3506869
highcharts - show label for first and last data points in a series
plotOptions: {
line : {
dataLabels : {
enabled : true,
formatter: function() {
var first = this.series.data[0],
last = this.series.data[this.series.data.length - 1];
if ((this.point.category === first.category && this.point.y === first.y) ||
(this.point.category === last.category && this.point.y === last.y)) {
return this.point.y;