Home Forums Chart Support y Values as time Reply To: y Values as time

#39405

@gbienemannkahle-schule-de,

You can use the indexLabelFormatter function to display custom index labels as per your requirement. Please take a look at the code-snippet given below.

indexLabelFormatter: function(e) {
    var s = e.dataPoint.y % 1; s *= 60;
    var m = e.dataPoint.y % 60;
    var h = (e.dataPoint.y - m) / 60;
    return (h < 10 ? "0" : "") + h.toString() + ":" + (m < 10 ? "0" : "") + Math.trunc(m).toString() + ":" + (s < 10 ? "0" : "") + s.toString();
},


Thangaraj Raman
Team CanvasJS