如何关闭highstock K线的缩进

clipboard.png

以上是正确
但是

clipboard.png

自动缩进了时间,多条合并了
如何解除 手册翻了几次没有找到 麻烦了哈

                $.getJSON('__MODULE__/Point/kline2/product/'+this.nowproduct_no+'/min/'+this.kline, function (data) {
                    if(data.code !== 1) {
                        alert('读取股票数据失败!');
                        return false;
                    }
                    data = data.data;
                    var ohlc = [],
                            volume = [],
                            dataLength = data.length,
                    // set the allowed units for data grouping
                            groupingUnits = [[
                                'week',                         // unit name
                                [1]                             // allowed multiples
                            ], [
                                'month',
                                [1, 2, 3, 4, 6]
                            ]],
                            i = 0;
                    for (i; i < dataLength; i += 1) {
                        ohlc.push([
                            data[i][0], // the date
                            data[i][1], // open
                            data[i][2], // high
                            data[i][3], // low
                            data[i][4] // close
                        ]);
                        volume.push([
                            data[i][0], // the date
                        ]);
                    }
                    // create the chart
                    var chart = Highcharts.stockChart('container2', {
                        credits:{
                            //版权
                            enabled:false,
                        },
                        exporting:{
                            //导出
                            enabled:false,
                        },
                        rangeSelector: {
                            enabled:false,
                            selected: 1,
                            inputDateFormat: '%Y-%m-%d'
                        },
                        title: {
                            text: null
                        },
                        xAxis: {
                            dateTimeLabelFormats: {
                                millisecond: '%H:%M:%S.%L',
                                second: '%H:%M:%S',
                                minute: '%H:%M',
                                hour: '%H:%M',
                                day: '%m-%d',
                                week: '%m-%d',
                                month: '%y-%m',
                                year: '%Y'
                            }
                        },
                        tooltip: {
                            split: false,
                            shared: true,
                        },
                        /*导航*/
                        navigator:{
                            enabled: false
                        },
                        /*拉伸*/
                        scrollbar: {
                            enabled: false
                        },
                        yAxis: [{
                            labels: {
                                align: 'right',
                                x: -3
                            },
                            title: {
                                text: null
                            },
                            height: '100%',
                            resize: {
                                enabled: true
                            },
                            lineWidth: 2
                        }, ],
                        series: [{
                            type: 'candlestick',
                            name: '行情',
                            color: 'green',
                            lineColor: 'green',
                            upColor: 'red',
                            upLineColor: 'red',
                            tooltip: {
                            },
                            navigatorOptions: {
                                color: Highcharts.getOptions().colors[0]
                            },
                            data: ohlc,
//                    dataGrouping: {
//                        units: groupingUnits
//                    },
                            id: 'sz'
                        }]
                    });
                });
                {/* K线 end */}
阅读 1.1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题