-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add pane index to price scale api #1821
Conversation
size-limit report 📦
|
Potentially minor. The series API has the // areaSeries is on Pane 0
const areaPriceScale = areaSeries.priceScale();
chart.swapPanes(0,1);
// areaSeries is now on Pane 1
areaPriceScale.applyOptions({
textColor: 'yellow'
}); // ← This applies to Pane 0, and thus not the price scale currently used by the area series. Not saying that this behaviour is wrong but rather that we should at least mention it in the JSDoc comment so it is clearer. It currently says: /**
* Returns interface of the price scale the series is currently attached
*
* @returns IPriceScaleApi object to control the price scale
*/
priceScale(): IPriceScaleApi; Perhaps we should mention (warn) that the price scale api returned is for the current price scale used by the series (id and pane index) and if the series is moved or starts to use a different id then this interface want to changed to the new price scale. |
@SlicedSilver updated the jsdoc, could you take a look pls |
Type of PR:
PR checklist:
Overview of change:
Added pane index as parameter to get price scale api. And fixed issue with getting correct price scale when series in not on the 1st pane