简体   繁体   English

高库存,多系列图表,独立xAxis

[英]Highstock, multiple series chart, independent xAxis

Following is the chart that I have, I want to add xaxis for both the charts depending on their data inputs, 以下是我拥有的图表,我想根据两个图表的数据输入为其添加xaxis,

where should I make the change or add xaxis so that I can define the min max limits for the xaxis. 我应该在哪里进行更改或添加xaxis,以便可以定义xaxis的最大最小值限制。

here is the fiddle: http://jsfiddle.net/pratik24/n24s2fyk/3/ 这是小提琴: http : //jsfiddle.net/pratik24/n24s2fyk/3/

code: 码:

$(function () {  
        $('#container').highcharts('StockChart', {

            navigator:{
                enabled: false
            },
            scrollbar:{
                enabled: false
            },

             rangeSelector : {
                selected : 1,
                 enabled:false
            },


            yAxis: [{
                  min: -1e6,
                max: 1e6,
                labels: {
                    align: 'left',
                    format : ''
                },
                title: {
                    text: 'OHLC'
                },
                height: '30%'
            }, {   min: -1e6,
                max: 1e6,
                labels: {
                    align: 'left',
                    x: -3,
                    format : ''
                },
                title: {
                    text: 'Volume'
                },
                top: '65%',
                height: '35%',
                offset: 0
            }],

            series: [{
                inverted: true,
                type: 'scatter',
                name: 'AAPL',

                data: [7.0, 6.9, 9.5, 14.5, 18.4],
                yAxis: 0
            }, {
                inverted: true,
                type: 'scatter',
                name: 'Volume',
                data: [3,6,8,5,2],
                  yAxis: 1

            }]
        });

});

Thanks in advance, 提前致谢,

Here is the solution: 解决方法如下:

  [http://jsfiddle.net/pratik24/uga37ox0/2/][1]

  [http://jsfiddle.net/uga37ox0/1/][1]

thanks to the guys from highcharts suppot team 感谢highcharts suppot团队的成员

 xAxis: [{

            },{
            offset: -245,
            min: 0,
            max: 10
        }],
   series: [{
                inverted: true,
                type: 'scatter',
                name: 'AAPL',
                data: [7.0, 6.9, 9.5, 14.5, 18.4],
                yAxis: 0,
                xAxis: 1
            }, {
                inverted: true,
                type: 'scatter',
                name: 'Volume',
                data: [3,6,8,5,2],
                yAxis: 1,
                xAxis:0

            }]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM