tickinterval不工作x轴的高图表

时间:2015-03-31 14:57:11

标签: javascript highcharts

这里是a link的小提琴,我尝试使用日期时间绘制x轴并传递带有数据点的多个系列。 在这里,我无法获得12月和2月份的刻度线

样本x轴

    xAxis: {

        type: 'datetime',
        //minTickInterval: 2419200000, //time in milliseconds
        //minRange: 2419200000,


        //showLastLabel: true,
        tickInterval: 2419200000,

    },

系列数据点

   {            
        "data": [{

            "x": 1420070400000,
            "y": 2,
        }, {

            "x": 1425168000000,
            "y": 1,                
        }],           
        "name": "Neither Dissatisfied or Satisfied",
        "color": "#5aa5dc",          
    }

请帮助我。

1 个答案:

答案 0 :(得分:1)

您需要将pointRange参数设置为单月。

xAxis: {
        type: 'datetime',
        tickInterval: 30 * 24 * 3600 * 1000,

    },
    plotOptions:{
        series:{
            pointRange:30 * 24 * 3600 * 1000
        }
    },

示例:http://jsfiddle.net/rtmv01gn/9/