I'm using Highcharts to display some charts for my project.
But I have some problems to display a Basic Bar charts with only TIME (not the date) on Yaxis. I searched some solutions but I didn't find the good one. Currently, I put data in milliseconds.
But it gives me this result : http://s14.postimg.org/z4vissaht/Capture_d_cran_2013_05_31_21_24_01.png
As you can see, it says me "Invalid Date" and milliseconds are display but I would like it to be "00:00:00". In the bottom of the chart, time is in the good format but it resets every 24hours whereas I don't want it. If milliseconds makes 62:00:00, I want it to be displayed like that.
I really need help, I don't know how to do that.
There is my jQuery code :
$('#chartTimeSpent').highcharts({
chart: {
renderTo : 'chartTimeSpent',
type: 'bar'
},
title: {
text: 'Time spent per technicians ' + dateInterval
},
xAxis: {
categories: [ 'Department','Department','Department','Department','Department','Department','Department','Department','Department','Department','Department','Department', ],
title: {
text: null
}
},
yAxis: {
min: 0,
title: {
text: 'Time (hours)',
align: 'high'
},
labels: {
overflow: 'justify'
},
type: 'datetime',
dateTimeLabelFormats : {
second: '%H:%M:%S',
minute: '%H:%M:%S',
hour: '%H:%M:%S',
day: '%H:%M:%S',
week: '%H:%M:%S',
month: '%H:%M:%S',
year: '%H:%M:%S'
}
},
tooltip: {
formatter: function() {
return ''+
"" +
'Time: '+ Highcharts.dateFormat('%H:%M:%S', this.x);
}
},
plotOptions: {
bar: {
dataLabels: {
enabled: true
}
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: -100,
y: 100,
floating: true,
borderWidth: 1,
backgroundColor: '#FFFFFF',
shadow: true
},
credits: {
enabled: false
},
series: [
{name: 'Someone',
data: [300000 ,0,6720000 ,6600000 ,11400000 ,1500000 ,900000 ,0,0,300000 ,0,0, ] },{name: 'Someone',
data: [2100000 ,1800000 ,1200000 ,3300000 ,60600000 ,0,13920000 ,5400000 ,18900000 ,300000 ,0,0, ] },{name: 'Someone',
data: [9840000 ,223380000 ,300000 ,3120000 ,8760000 ,2460000 ,9300000 ,2820000 ,3960000 ,1320000 ,900000 ,540000 , ] }, ]
});
EDITED : last jsFiddle