Reversed PunchCard days: (Now top -> bottom = Monday -> Sunday)

This commit is contained in:
Rsl1122 2018-02-11 15:23:42 +02:00
parent 69c8111be8
commit cdbd8f9496

View File

@ -1,26 +1,30 @@
function punchCard(id, punchcardSeries) { function punchCard(id, punchcardSeries) {
Highcharts.chart(id, { Highcharts.chart(id, {
chart: { chart: {
defaultSeriesType: 'scatter' defaultSeriesType: 'scatter'
}, },
title: {text: ''}, title: {text: ''},
xAxis: { xAxis: {
type: 'datetime', type: 'datetime',
dateTimeLabelFormats: { dateTimeLabelFormats: {
hour: '%I %P', hour: '%I %P',
day: '%H %P' day: '%H %P'
}, },
tickInterval: 3600000 tickInterval: 3600000
},
time: {
timezoneOffset: 0
}, },
yAxis: { time: {
categories: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'] timezoneOffset: 0
}, },
tooltip: { yAxis: {
pointFormat: 'Activity: {point.z}' title: {
}, text: "Day of the Week"
series: [punchcardSeries] },
}); reversed: true,
categories: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
},
tooltip: {
pointFormat: 'Activity: {point.z}'
},
series: [punchcardSeries]
});
} }