Skip to content
Discussion options

You must be logged in to vote

You are given an instance of IPaneApi when using chart.panes()[0]. You can consider this the 'default' pane and keep a reference to it. You can use the paneIndex() method to get it's current index on the chart.

const first = chart.panes()[0];

chart.swapPanes(0, 1);

console.log(first.paneIndex()); // -> 1
console.log(chart.panes().indexOf(first)); // -> 1

chart.swapPanes(0, 1);

console.log(chart.panes().indexOf(first)); // -> 0
console.log(first.paneIndex()); // -> 0

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SlicedSilver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1837 on March 21, 2025 16:20.