PinPlot action
Use this action with change({ id: 'PinPlot', context }).
Context
id?:Get|Update(Updateis assumed if omitted)type: plot type (Symbol|Study|IncomeStatement|BalanceSheet|Expression|Forward|Seasonal)- plot selector:
uid(preferred) orindex targetAxis(forUpdate):PrimaryAxis|SecondaryAxis|NoAxis
Behavior
PinPlot moves a plot between axes in its pane.
It is conceptually the axis version of MovePlot:
Get: returns which axis targets are currently validUpdate: moves the plot to one selected target
Sub-actions
Get
Returns the list of valid axis targets for the selected plot.
- Returns
[]if selector/type does not resolve to a matching plot. PrimaryAxis: primary axis for that pane.SecondaryAxis: the other axis in that pane.NoAxis: detached axis mode for that plot.NoAxisis available only when at least one other plot in the pane remains axis-attached.
Example:
const targets = chart.change({ id: "PinPlot", context: { id: "Get", type: "Study", uid: studyUid },});Update
Pins the selected plot to targetAxis.
- If
targetAxisis not valid for the current plot (or missing), nothing changes. NoAxisuses detached-scale behavior for the plot.
Example:
chart.change({ id: "PinPlot", context: { type: "Study", uid: studyUid, targetAxis: "SecondaryAxis" },});