在y轴上显示最后一个标签时,是否为范围选择器填充Highcharts?

在y轴上显示最后一个标签时,是否为范围选择器填充Highcharts?,highcharts,highstock,Highcharts,Highstock,当我显示yaxis的最后一个标签时,范围选择器的间距变得拥挤 例如: 你可以看到“75”和“30”是如何被卡住的 有没有办法在范围选择器周围获得更多空间?我一直在处理各种各样的填充值,但没有任何效果 代码: 可以将maxPadding()与设置tickInterval()一起使用 @塞巴斯蒂安·博坎,我们不能用范围选择器吗?为什么这个范围选择器不能用于缩放按钮 范围选择器:{ 输入位置:{ y:5 } }我向您介绍了一种解决方案。rangeSelector仅适用于highstock,它不适用于

当我显示yaxis的最后一个标签时,范围选择器的间距变得拥挤

例如:

你可以看到“75”和“30”是如何被卡住的

有没有办法在范围选择器周围获得更多空间?我一直在处理各种各样的填充值,但没有任何效果

代码:

可以将maxPadding()与设置tickInterval()一起使用


@塞巴斯蒂安·博坎,我们不能用范围选择器吗?为什么这个范围选择器不能用于缩放按钮

范围选择器:{ 输入位置:{ y:5 }
}

我向您介绍了一种解决方案。rangeSelector仅适用于highstock,它不适用于HighCharts,因为navigator/rangeSelector仅适用于highstock。我感谢您的回复,但您所介绍的是一种黑客行为。这相当于多了一个滴答声间隔,而不显示最后一个滴答声间隔。在图的顶部,我想看到最大值,在本例中是75,而不是75和它上面额外的刻度间隔的空间。
<code>
$(function () {
    var chart = new Highcharts.StockChart({
        chart: {
            renderTo: 'container',
            alignTicks: false
        },

        yAxis: [{ // Primary yAxis
                endOnTick: true,
                showLastLabel: true,
                title: {
                    text: 'Time Published',
                    style: {
                        color: '#89A54E'
                    }
                },
                gridLineWidth: 0,
                opposite: true,

            }, { // Secondary yAxis
                showLastLabel: true,
                title: {
                    text: '% Audience Coverage',
                    style: {
                        color: '#4572A7'
                    }
                },

            }],

        series: [{

            yAxis: 0,
            type: "scatter",
            data:[ [1142294400000,2],
                   [1183334400000,5],
                   [1199232000000,18],
                   [1230768000000,9],
                   [1262304000000,4],
                   [1294012800000,20],
                   [1325548800000,1],
                   [1357084800000,6] ]

        }, {

            yAxis: 1,
            type: "areaspline",
            data:[ [1142294400000,9],
                   [1183334400000,10],
                   [1199232000000,15],
                   [1230768000000,25],
                   [1262304000000,35],
                   [1294012800000,46],
                   [1325548800000,47],
                   [1357084800000,68] ]

        }]
    });
});
</code>
yAxis: [{ // Primary yAxis
            showLastLabel: false,
            title: {
                text: 'Time Published',
                style: {
                    color: '#89A54E'
                }
            },
            gridLineWidth: 0,
            opposite: true,
            tickInterval:10,
            maxPadding:1

        }, { // Secondary yAxis
            showLastLabel: false,
            maxPadding:0.2,
            tickInterval:25,
            title: {
                text: '% Audience Coverage',
                style: {
                    color: '#4572A7'
                }
            },

        }],