Charts Highstocks图表多窗格宽度和y轴对齐问题

Charts Highstocks图表多窗格宽度和y轴对齐问题,charts,highcharts,highstock,Charts,Highcharts,Highstock,我对highstock多窗格图表中每个窗格的y轴宽度和对齐方式有疑问 只有当highstocks图表中有两个以上的窗格时,才会观察到此问题 这里的问题是什么 $(function() { var groupingUnits = [ [ 'minute', // unit name [60] // allowed multiples ], [ 'day', [1]],

我对highstock多窗格图表中每个窗格的y轴宽度和对齐方式有疑问

只有当highstocks图表中有两个以上的窗格时,才会观察到此问题

这里的问题是什么

$(function() {

var groupingUnits = [
        [
            'minute', // unit name
            [60] // allowed multiples
        ],
        [
            'day', [1]],
        [
            'week', [1]],
        [
            'month', [1]]
    ];
    Highcharts.setOptions({
        global: {
            useUTC: false
        }
    });

his_WscaleTranstek_chart = Highcharts.stockChart('container', {
        plotOptions: {
            series: {
                dataGrouping: {
                    units: groupingUnits
                },

                marker: {
                    enabled: true,
                    symbol: 'cirlce',
                    states: {
                        select: {
                            fillColor: 'red',
                            lineWidth: 0,
                            radius: 5
                        }
                    }
                },

                cursor: 'pointer',

            }

        },
        rangeSelector: {
            selected: 2,
            buttons: [{
                    type: 'minute',
                    count: 60,
                    text: '1h'
                }, {
                    type: 'day',
                    count: 1,
                    text: '1d'
                }, {
                    type: 'week',
                    count: 1,
                    text: '1w'
                }, {
                    type: 'month',
                    count: 1,
                    text: '1m'
                }, {
                    type: 'month',
                    count: 3,
                    text: '3m'
                }, {
                    type: 'month',
                    count: 6,
                    text: '6m'
                }, {
                    type: 'year',
                    count: 1,
                    text: '1y'
                }, {
                    type: 'all',
                    text: 'All'
                }]
        },
        yAxis: [
            {
                opposite: false,
                min: 0,
                max: 50,
                tickInterval: 5,
                top:'0%',
                height: '15%',
                labels: {
                    align: 'right',
                    x: -3
                },
                title: {
                    text: 'y Axis 1 '
                },
                plotBands: [{
                        from: 0,
                        to: 16,
                        color: 'rgba(16, 180, 146, 0.56)'
                    }, {
                        from: 16,
                        to: 19,
                        color: 'rgba(0, 195, 206, 0.5)'
                    }, {
                        from: 19,
                        to: 25,
                        color: 'rgba(7, 235, 78, 0.68)'
                    }, {
                        from: 25,
                        to: 30,
                        color: 'rgba(225, 239, 6, 0.68)'
                    }, {
                        from: 30,
                        to: 40,
                        color: 'rgba(239, 134, 5, 0.5)'
                    }, {
                        from: 40,
                        to: 50,
                        color: 'rgba(251, 44, 6, 0.5)'
                    }
                ],
                lineWidth: 2,
                //maxPadding: 0,
                endOnTick: false,
                gridLineWidth: 0
            }, {
                opposite: false,
                min: 20,
                max: 280,
                tickInterval: 10,
                labels: {
                    align: 'right',
                    x: -3
                },
                title: {
                    text: 'y Axis 2'
                },

                lineWidth: 1,
                top: '17%',
                height: '15%',
                offset: 0,
                //maxPadding: 0,
                endOnTick: false,
                gridLineWidth: 0
            },{
                opposite: false,
                min: 0,
                max: 50,
                tickInterval: 5,
                top: '34%',
                height: '15%',
                labels: {
                    align: 'right',
                    x: -3
                },
                title: {
                    text: 'y Axis 3'
                },

                lineWidth: 2,
                //maxPadding: 0,
                endOnTick: false,
                gridLineWidth: 0
            },
            {
                opposite: false,
                min: 0,
                max: 80,
                tickInterval: 5,
                top: '51%',
                height: '15%',
                labels: {
                    align: 'right',
                    x: -3
                },
                title: {
                    text: 'y Axis 4'
                },
                plotBands: [],
                lineWidth: 2,
                maxPadding: 0,
                endOnTick: false,
                gridLineWidth: 0
            },
            {
                opposite: false,
                min: 10,
                max: 70,
                tickInterval: 5,
                top: '68%',
                height: '15%',
                labels: {
                    align: 'right',
                    x: -3
                },
                title: {
                    text: 'y Axis 5'
                },
                plotBands: [],
                lineWidth: 2,
                maxPadding: 0,
                endOnTick: false,
                gridLineWidth: 0
            },{
                opposite: false,
                min: 0,
                max: 8,
                tickInterval: 5,
                top: '85%',
                height: '15%',
                labels: {
                    align: 'right',
                    x: -3
                },
                title: {
                    text: 'y Axis 6'
                },
                plotBands: [],
                lineWidth: 2,
                maxPadding: 0,
                endOnTick: false,
                gridLineWidth: 0
            }
        ],
        title: {
            text: 'Chart',
            style: {
                color: '#4e80b2'
            }
        },
        legend: {
            enabled: false,
            itemStyle: {
                'cursor': 'default'
            }
        },
        series: [
            {
                type: 'line',
                name: 'BMI',
                data: [15,15,15,15,15,15,15],
                lineColor: "#777d7d",
                "tooltip": {
                    pointFormatter: function () {
                        var point = this;
                        return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + Math.round((point.y)) + ' </b><br/>';
                    }
                },
                marker: {
                    fillColor: 'white',
                    lineWidth: 2,
                    lineColor: "#777d7d"
                },
                yAxis: 0,
                showInLegend: false
            },
            {
                type: 'line',
                name: 'WEIGHT',
                data:  [15,15,15,15,15,15,15],
                lineColor: "#777d7d",
                "tooltip": {
                    pointFormatter: function () {
                        var point = this;
                        return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + (point.y) + ' kg</b><br/>';
                    }
                },
                marker: {
                    fillColor: 'white',
                    lineWidth: 2,
                    lineColor: "#777d7d"
                },
                yAxis: 1,
                showInLegend: false
            },

            {
                type: 'line',
                name: 'Fat %',
                data:  [15,15,15,15,15,15,15],
                lineColor: "#777d7d",
                "tooltip": {
                    pointFormatter: function () {
                        var point = this;
                        return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + (point.y) + ' kg</b><br/>';
                    }
                },
                marker: {
                    fillColor: 'white',
                    lineWidth: 2,
                    lineColor: "#777d7d"
                },
                yAxis: 2,
                showInLegend: false
            },
            {
                type: 'line',
                name: 'Water %',
                data: [15,15,15,15,15,15,15],
                lineColor: "#777d7d",
                "tooltip": {
                    pointFormatter: function () {
                        var point = this;
                        return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + (point.y) + ' kg</b><br/>';
                    }
                },
                marker: {
                    fillColor: 'white',
                    lineWidth: 2,
                    lineColor: "#777d7d"
                },
                yAxis: 3,
                showInLegend: false
            },
            {
                type: 'line',
                name: 'Muscle mass',
                data:  [15,15,15,15,15,15,15],
                lineColor: "#777d7d",
                "tooltip": {
                    pointFormatter: function () {
                        var point = this;
                        return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + (point.y) + ' kg</b><br/>';
                    }
                },
                marker: {
                    fillColor: 'white',
                    lineWidth: 2,
                    lineColor: "#777d7d"
                },
                yAxis: 4,
                showInLegend: false
            },
            {
                type: 'line',
                name: 'Bone Weight',
                data:  [15,15,15,15,15,15,15],
                lineColor: "#777d7d",
                "tooltip": {
                    pointFormatter: function () {
                        var point = this;
                        return '<span style="color:' + point.color + '">\u25CF</span> ' + point.series.name + ': <b>' + (point.y) + ' kg</b><br/>';
                    }
                },
                marker: {
                    fillColor: 'white',
                    lineWidth: 2,
                    lineColor: "#777d7d"
                },
                yAxis: 5,
                showInLegend: false
            }
        ],
        navigator: {
            height: 30
        }
    }
)

});
$(函数(){
变量groupingUnits=[
[
'分钟',//单位名称
[60]//允许的倍数
],
[
“天”,[1]],
[
“一周,[1]],
[
“月”[1]]
];
Highcharts.setOptions({
全球:{
useUTC:false
}
});
his_WscaleTranstek_chart=Highcharts.stockChart('container'){
打印选项:{
系列:{
数据分组:{
单位:分组单位
},
标记:{
启用:对,
符号:'cirlce',
国家:{
选择:{
fillColor:'红色',
线宽:0,
半径:5
}
}
},
光标:“指针”,
}
},
范围选择器:{
选定:2,
按钮:[{
键入:“分钟”,
计数:60,
文本:“1h”
}, {
键入:'天',
计数:1,
文本:“1d”
}, {
键入:“周”,
计数:1,
文本:“1w”
}, {
键入:“月”,
计数:1,
文字:“1m”
}, {
键入:“月”,
计数:3,
文字:“3m”
}, {
键入:“月”,
计数:6,
文字:“6m”
}, {
类型:'年',
计数:1,
文本:“1y”
}, {
键入:“全部”,
文字:“全部”
}]
},
亚克斯:[
{
反面:错,
分:0,,
最高:50,
时间间隔:5,
顶部:'0%',
身高:15%,
标签:{
对齐:“右”,
x:-3
},
标题:{
文本:“y轴1”
},
绘图带:[{
起:0,,
致:16,
颜色:“rgba(16180146,0.56)”
}, {
从:16,
致:19,
颜色:“rgba(0,195,206,0.5)”
}, {
从:19,
致:25,,
颜色:'rgba(7235780.68)'
}, {
起:25,,
致:30,,
颜色:“rgba(225239,6,0.68)”
}, {
起:30,,
致:40,,
颜色:“rgba(239134,5,0.5)”
}, {
起:40,,
致:50,,
颜色:“rgba(251,44,6,0.5)”
}
],
线宽:2,
//maxPadding:0,
恩东蒂克:错,
网格线宽:0
}, {
反面:错,
民:20,,
最高:280,
时间间隔:10,
标签:{
对齐:“右”,
x:-3
},
标题:{
文字:“y轴2”
},
线宽:1,
前几名:“17%”,
身高:15%,
偏移量:0,
//maxPadding:0,
恩东蒂克:错,
网格线宽:0
},{
反面:错,
分:0,,
最高:50,
时间间隔:5,
前三名:“34%,
身高:15%,
标签:{
对齐:“右”,
x:-3
},
标题:{
文字:“y轴3”
},
线宽:2,
//maxPadding:0,
恩东蒂克:错,
网格线宽:0
},
{
反面:错,
分:0,,
最高:80,
时间间隔:5,
前五名:“51%”,
身高:15%,
标签:{
对齐:“右”,
x:-3
},
标题:{
文字:“y轴4”
},
绘图带:[],
线宽:2,
maxPadding:0,
恩东蒂克:错,
网格线宽:0
},
{
反面:错,
民:10,,
最高:70,
时间间隔:5,
前几名:“68%”,
身高:15%,
标签:{
对齐:“右”,
x:-3
},
标题:{
文字:“y轴5”
},
绘图带:[],
线宽:2,
maxPadding:0,
恩东蒂克:错,
网格线宽:0
},{
反面:错,
分:0,,
最高:8,
时间间隔:5,
排名前:“85%”,
 yAxis: [{
  offset: 0,