score:1

Accepted answer

In fact, you want to get a total time instead of DateTime. In this case, you'll need to create your own label formatter that will convert milliseconds to a number of hours, minutes and seconds.

Example code:

  dataLabels: {
        enabled: true,
        formatter: function() {
          let s, m, h;
          s = this.y / 1000;
          h = parseInt(s / 3600);
          s = s % 3600;
          m = parseInt(s / 60);
          s = (s % 60).toFixed(0);
          let number = (h + ":" + m + ":" + s);

          return number;
        }
      }

API Reference: https://api.highcharts.com/highcharts/series.column.dataLabels.formatter

Demo: https://jsfiddle.net/BlackLabel/Lcjewr2o/


Related Articles