plugin-api/PlotActionRegistry#
usePlotActionButtons()#
React hook that returns all registered plot action buttons, re-rendering on changes.
Returns#
plotActionRegistry#
PlotActionButtonDef#
Static definition for a plot action button (registered at module load time).
Properties#
group?#
Optional visual group key for clustering buttons in the sidebar.
icon#
id#
isDisabled?#
Dynamic disabled state.
Parameters#
| Parameter | Type |
|---|---|
ctx |
PlotContext |
Returns#
boolean
isLoading?#
Dynamic loading state.
Parameters#
| Parameter | Type |
|---|---|
ctx |
PlotContext |
Returns#
boolean
isToggle?#
Whether this button acts as a toggle (active/inactive). Default: true.
order#
Sort order. Built-in buttons use 100–700.
panelComponent?#
optional panelComponent?: ComponentType<{
activePage: string;
onClose: () => void;
plotId: string | undefined;
}>;
For plugin buttons: panel component rendered in PopoutWindow when active.
panelConfig?#
PopoutWindow config (only used if panelComponent is set).
height#
title#
width#
windowId#
plotClickHandler?#
For plugin buttons: called when user clicks the plot while this button is active.
Parameters#
| Parameter | Type |
|---|---|
dataX |
number |
dataY |
number |
Returns#
void
tooltip#
visibilityCondition#
Parameters#
| Parameter | Type |
|---|---|
ctx |
PlotContext |
Returns#
boolean
PlotContext#
Context describing the current plot state, passed to visibility conditions.
Properties#
hasData#
is2D#
isContourPlot#
isRidgePlot#
isSpectrumPlot#
isSurface#
legendVisible#
Whether the plot legend is currently shown (plotSettings.legend.show).