高图表范围选择器不起作用



我有一个图表。我想这样显示范围选择器http://www.highcharts.com/docs/chart-concepts/range-selector我的代码:

$('#timeline').highcharts({
    chart: {
        type: 'columnrange',
        inverted: true,
    },
    scrollbar: {
        enabled: true
    },
    yAxis: {
        labels: {
            formatter: function() {
                var $moment = moment(this.value);
                return $moment.format("YYYY-MM-DD") + "<br/>("+ $moment.format("HH:mm:ss") + ")";
            }
        }
    },
    plotOptions: {
        columnrange: {
            grouping: false
        }
    },
    rangeSelector: {
        enabled: true
    },
    legend: {
        enabled: true
    },
    tooltip: {
        formatter: function () {
            return '<b>' + this.x + ' - ' + this.series.name + '</b><br/>' +
                moment(this.point.low).format("DD MMMM HH:mm:ss") + " - " +
                moment(this.point.high).format("DD MMMM HH:mm:ss");
        }
    },
    series: JSON.parse('[{"name":"200","data":[{"x":0,"low":1438974756000,"high":1438974945000},{"x":0,"low":1438975321000,"high":1438975573000},{"x":0,"low":1438975697000,"high":1438980175000},{"x":0,"low":1439016907000,"high":1439017219000}]},{"name":"404","data":[{"x":0,"low":1438975005000,"high":1438975133000}]},{"name":"503","data":[{"x":0,"low":1438975197000,"high":1438975258000}]},{"name":"500","data":[{"x":0,"low":1438975637000,"high":1438975637000},{"x":0,"low":1439016542000,"high":1439016846000}]}]');
});

但是范围选择器不起作用。我做错了什么?

put:

allButtonsEnabled: true

,然后试试这个。并在xAxis中设置最小日期:

min:Date.UTC(2015,0,1)

最新更新