MovePlot action
Use this action with change({ id: 'MovePlot', context }).
Context
id?:Get|Update(Updateis assumed if omitted)type: plot type (Symbol|Study|IncomeStatement|BalanceSheet|Expression|Forward|Seasonal)- plot selector:
uid(preferred) orindex targetPane(forUpdate):ExistingAbove|NewAbove|ExistingBelow|NewBelow
Behavior
MovePlot moves a plot between panes.
MovePlot has two sub-actions:
Get: returns which move targets are currently validUpdate: performs the move to a chosen target
Sub-actions
Get
Returns the list of valid targets for the selected plot.
- Returns
[]if selector/type does not resolve to a matching plot. ExistingAbove/ExistingBeloware available when there is already a pane above/below.NewAbove/NewBeloware available when a new pane can be created above/below the current pane.
Example:
const targets = chart.change({ id: "MovePlot", context: { id: "Get", type: "Seasonal", uid: seasonalUid },});Update
Moves the selected plot to targetPane.
- If
targetPaneis not valid for the current plot (or missing), nothing changes. - If
NewAbove/NewBelowis used, the chart creates a new pane on that side and moves the plot there.
Example:
chart.change({ id: "MovePlot", context: { type: "Seasonal", uid: seasonalUid, targetPane: "NewBelow" },});