将时间值传递给Highcharts Column图表

我想要一个图表,其中Y轴包含时间值,如’%H:%M:%S’

我为此使用过Highcharts插件

X轴:[“dep1”,“dep2”,“dep3”]

Y轴:[“00:15:30”,“00:55:30”,“00:45:30”]

我的代码如下:

$('#durationChart').highcharts({ chart: { type: 'column' }, title: { text: 'Avg. values' }, xAxis: { categories: ["dep1","dep2","dep3"], labels: { rotation: -45, style: { fontSize: '11px', fontFamily: 'tahoma, sans-serif' } } }, yAxis: { type: 'datetime', dateTimeLabelFormats: { second: '%H:%M:%S', minute: '%H:%M', hour: '%H:%M', day: '%e. %b', week: '%e. %b', month: '%b \'%y', year: '%Y' } }, plotOptions: { column: { pointPadding: 0.2, borderWidth: 0, dataLabels: { enabled: true, formatter:function() { return ''+ Highcharts.dateFormat('%H:%M:%S', this.y); } } } },credits: { enabled: false }, series: [{ name: 'Territories', colorByPoint: false, data: ["00:15:24", "00:13:51", "00:11:17", "00:20:02", "00:11:55", "00:10:00", "00:15:46", "00:10:54", "00:00:01", "00:01:01", "00:01:03", "00:01:47", "00:02:47", "00:01:50", "00:01:53", "00:00:43", "00:11:46", "00:00:02", "00:01:03", "00:05:07", "00:01:42", "00:16:11"] }] });` 

我无法在Y轴上生成带有时间值的图表

我不需要显示任何日期

我在下面分享的示例图片……

在此处输入图像描述

在这里看到答案:

  • 如何在“highcharts”中消磨时间?

您仍需要发送完整日期。 然后,您可以将输出格式化为仅显示时间部分。

或者您可以将整数秒发送给时间。