Highcharts 高图表:日期缩短1个月

Highcharts 高图表:日期缩短1个月,highcharts,Highcharts,我不确定发生了什么,但一个月后,日期会显示在轴上和工具提示中。因此,这张图表上的第一个数据日期是7月,但它显示为8月,以此类推。有什么想法吗?我将代码放在一个JSFiddle()中,如下所示: $(function () { $('#container').highcharts({ chart: { type: 'spline' }, title: { text: '' }, plotOptions: { s

我不确定发生了什么,但一个月后,日期会显示在轴上和工具提示中。因此,这张图表上的第一个数据日期是7月,但它显示为8月,以此类推。有什么想法吗?我将代码放在一个JSFiddle()中,如下所示:

$(function () {
$('#container').highcharts({
    chart: {
        type: 'spline'
    },
    title: {
        text: ''
    },
    plotOptions: {
        series: {
            lineWidth: 5,
            marker: {
                fillColor: '#FFFFFF',
                lineWidth: 2,
                radius: 6,
                lineColor: null // inherit from series
            }
        }
    },
    subtitle: {
        text: ''
    },
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: { // don't display the dummy year
            month: '%e %b',
            year: '%b'
        }
    },
    yAxis: {
        title: {
            text: 'Ability Score (out of 100)',
            style: {
                color: '#323A45',
                fontWeight: 'bold'
            }
        },
        min: 0
    },
    tooltip: {
        formatter: function () {
            return '<b>' + this.series.name + '</b><br/>' + Highcharts.dateFormat('%e %b', this.x) + ': ' + this.y;
        }
    },

    series: [{
        name: 'Overall Ability',
        // Define the data points. All series have a dummy year
        // of 1970/71 in order to be compared on the same x axis. Note
        // that in JavaScript, months start at 0 for January, 1 for February etc.
        data: [
            [Date.UTC(2013, 07, 12), 50],
            [Date.UTC(2013, 08, 13), 57.9474605576],
            [Date.UTC(2013, 08, 14), 58.5667571154],
            [Date.UTC(2013, 08, 15), 69.0590308869], ]

    }, {
        name: 'Target',
        data: [
            [Date.UTC(2013, 07, 12), 80],
            [Date.UTC(2013, 08, 13), 80],
            [Date.UTC(2013, 08, 14), 80],
            [Date.UTC(2013, 08, 15), 80],
            /*
                    [Date.UTC(2013,  0,  1), 80.0],
                    [Date.UTC(2013,  1,  1), 80.0],
                    [Date.UTC(2013,  2,  1), 80.0],
                    [Date.UTC(2013,  3,  1), 80.0],
                    [Date.UTC(2013,  4,  1), 80.0],
                    [Date.UTC(2013,  5,  1), 80.0],
                    [Date.UTC(2013,  6,  1), 80.0],
                    [Date.UTC(2013,  7,  1), 80.0]
                    */
}))


提前感谢。

您可以从本文档中看到:

});
month
An integer between 0 and 11 representing the month.