yAxis resizer可同时更改SvgRender位置和highcharts

yAxis resizer可同时更改SvgRender位置和highcharts,highcharts,Highcharts,任何帮助都将不胜感激。我遇到了很大的麻烦。谢谢您可以在渲染事件中添加并定位自定义按钮: I have a chart with some indicators below it. Each indicator area consists of a svg renderer button. so when I use resize property to drag and resize the panes, the series resized perfectly but the button


任何帮助都将不胜感激。我遇到了很大的麻烦。谢谢

您可以在
渲染
事件中添加并定位自定义按钮:

I have a chart with some indicators below it. Each indicator area consists 
of a svg renderer button. so when I use resize property to drag and resize 
the panes, the series resized perfectly but the button remains in its same 
position, Can we move the button with the resizer?
Here I created a sample link to regenerate 

现场演示:

API参考:


非常感谢您的回复。如果我将按钮保存在图表对象之外的某个位置,并尝试以您的方式更新它会怎么样。这是我声明的按钮变量Hi@Mitchelle,是的,你可以这样做。示例:`data(){return{btn:[],stockOptions:{chart:{events:{redraw:function(){console.log(btn)}},zoomType:'',spacingRight:30,height:window.innerHeight-51-56},}`无法访问此处的btn是的,您不能这样做。您需要将变量置于更高的范围内。再次感谢@ppotaczek。我将尝试不同的方法,并让您知道
chart: {
    events: {
        render: function() {
            var chart = this;

            if (chart.customBtn) {
                chart.customBtn.attr({
                    y: chart.yAxis[1].top,
                });

            } else {
                chart.customBtn = chart.renderer.button(
                    'sometext',
                    5,
                    chart.yAxis[1].top,
                    function() {
                        console.log('some task')
                    }).add()
            }
        }
    }
},