highslide-software/highcharts.com — Issue #565: [BUG] Wrong months labels and 31st October issue
Author: floernoult
Created: 2011-11-14 11:07:07+00:00
State: open

I just tried your last release 2.1.9, and it appears that months labels are shifted by one. (October is displayed as November, November as December and so on....). You can see it on the website examples (http://www.highcharts.com/demo/spline-irregular-time).

Moreover, I made a graph with one value per day during one month from October 13 to November 9, and the graph is displaying two data entries on November 1st, but October 31st doesn't exist. Consequently, from November 1st, the day label is wrong as I have to points of data on Monday November 1st (which actually is a tuesday).

Here my chart code if you want to test :

var myChart = new Highcharts.Chart({
chart: {
renderTo: 'myChart',
defaultSeriesType: 'line',
height: 250,
marginBottom: 100,
width: chartWidth,
zoomType: 'x'
},
title: {
text: null
},
tooltip: {
crosshairs: true,
shared: true
},
xAxis: {
type: 'datetime',
maxZoom: 3 * 24 * 3600000,
labels: {
rotation: -45,
y: 25,
formatter: function() {
return Highcharts.dateFormat('%d. %b', this.value);
}
}
},
yAxis: [{
min: 0,
title: {
text: null
},
labels: {
style: {
color: '#558133'
}
}
}, {
min: 0,
title: {
text: null
},
opposite: true,
labels: {
style: {
color: '#3B5998'
}
}
}, {
min: 0,
title: {
text: null
},
labels: {
style: {
color: '#AA4643'
}
},
}],
series: [{
name: "Data 1",
yAxis: 1,
color: '#3B5998',
data: [[Date.UTC(2011, 10, 13), 12088], [Date.UTC(2011, 10, 14), 12097], [Date.UTC(2011, 10, 15), 12106], [Date.UTC(2011, 10, 16), 12113], [Date.UTC(2011, 10, 17), 12124], [Date.UTC(2011, 10, 18), 12130], [Date.UTC(2011, 10, 19), 12138], [Date.UTC(2011, 10, 20), 12153], [Date.UTC(2011, 10, 21), 12167], [Date.UTC(2011, 10, 22), 12172], [Date.UTC(2011, 10, 23), 12181], [Date.UTC(2011, 10, 24), 12194], [Date.UTC(2011, 10, 25), 12202], [Date.UTC(2011, 10, 26), 12213], [Date.UTC(2011, 10, 27), 12221], [Date.UTC(2011, 10, 28), 12226], [Date.UTC(2011, 10, 29), 12232], [Date.UTC(2011, 10, 30), 12239], [Date.UTC(2011, 10, 31), 12244], [Date.UTC(2011, 11, 01), 12252], [Date.UTC(2011, 11, 02), 12263], [Date.UTC(2011, 11, 03), 12276], [Date.UTC(2011, 11, 04), 12279], [Date.UTC(2011, 11, 05), 12289], [Date.UTC(2011, 11, 06), 12299], [Date.UTC(2011, 11, 07), 12315], [Date.UTC(2011, 11, 08), 12328], [Date.UTC(2011, 11, 09), 12338]]
},{
name: "Data 2",
color: '#558133',
data: [[Date.UTC(2011, 10, 13), 10], [Date.UTC(2011, 10, 14), 9], [Date.UTC(2011, 10, 15), 9], [Date.UTC(2011, 10, 16), 7], [Date.UTC(2011, 10, 17), 13], [Date.UTC(2011, 10, 18), 7], [Date.UTC(2011, 10, 19), 8], [Date.UTC(2011, 10, 20), 15], [Date.UTC(2011, 10, 21), 15], [Date.UTC(2011, 10, 22), 6], [Date.UTC(2011, 10, 23), 9], [Date.UTC(2011, 10, 24), 15], [Date.UTC(2011, 10, 25), 8], [Date.UTC(2011, 10, 26), 12], [Date.UTC(2011, 10, 27), 13], [Date.UTC(2011, 10, 28), 5], [Date.UTC(2011, 10, 29), 7], [Date.UTC(2011, 10, 30), 8], [Date.UTC(2011, 10, 31), 7], [Date.UTC(2011, 11, 01), 9], [Date.UTC(2011, 11, 02), 12], [Date.UTC(2011, 11, 03), 13], [Date.UTC(2011, 11, 04), 11], [Date.UTC(2011, 11, 05), 10], [Date.UTC(2011, 11, 06), 11], [Date.UTC(2011, 11, 07), 16], [Date.UTC(2011, 11, 08), 14], [Date.UTC(2011, 11, 09), 10]]
},{
name: "Data 3",
color: '#AA4643',
yAxis: 2,
data: [[Date.UTC(2011, 10, 13), 2], [Date.UTC(2011, 10, 14), 0], [Date.UTC(2011, 10, 15), 0], [Date.UTC(2011, 10, 16), 0], [Date.UTC(2011, 10, 17), 2], [Date.UTC(2011, 10, 18), 1], [Date.UTC(2011, 10, 19), 0], [Date.UTC(2011, 10, 20), 0], [Date.UTC(2011, 10, 21), 1], [Date.UTC(2011, 10, 22), 1], [Date.UTC(2011, 10, 23), 0], [Date.UTC(2011, 10, 24), 2], [Date.UTC(2011, 10, 25), 0], [Date.UTC(2011, 10, 26), 1], [Date.UTC(2011, 10, 27), 5], [Date.UTC(2011, 10, 28), 0], [Date.UTC(2011, 10, 29), 1], [Date.UTC(2011, 10, 30), 1], [Date.UTC(2011, 10, 31), 2], [Date.UTC(2011, 11, 01), 1], [Date.UTC(2011, 11, 02), 1], [Date.UTC(2011, 11, 03), 0], [Date.UTC(2011, 11, 04), 8], [Date.UTC(2011, 11, 05), 0], [Date.UTC(2011, 11, 06), 1], [Date.UTC(2011, 11, 07), 0], [Date.UTC(2011, 11, 08), 1], [Date.UTC(2011, 11, 09), 0]]
}],
navigation: {
buttonOptions: {
verticalAlign: 'bottom',
y: -20
}
}
});