Interface: ComponentView
Experimental
Properties
Methods
animateCamera()?
optional animateCamera(camera, run): Promise<void> | undefined;Experimental
Camera animation (E7.5, chart.animateCamera): move the camera of the view's subplot run.subplot (default: its first) to camera with run's duration and easing, resolving when it arrives. Return undefined when the view has no such subplot (the chart asks the next view).
Parameters
| Parameter | Type |
|---|---|
camera | CameraTarget |
run | CameraAnimationRun |
Returns
Promise<void> | undefined
dispose()?
optional dispose(): void;Experimental
Returns
void
drawShape()?
optional drawShape(gesture): boolean | void;Experimental
Shape drawing hook (E5.5, see DrawGesture). Return true when the view handles the gesture: later views are then not asked for this call.
Parameters
| Parameter | Type |
|---|---|
gesture | DrawGesture |
Returns
boolean | void
handlePointer()?
optional handlePointer(event): boolean | void;Experimental
Pointer hook (M1 wave 2): the runtime offers every pointer event to component views first — topmost (last drawn) first — and only runs its own hover / zoom / pan / selection when none returns true. Return true for events over your own hit regions (e.g. legend items): a handled down also routes the rest of that gesture (move, up, click) to this view only, and a handled move hides hover labels. DOM components (modebar) get their own DOM events and don't need this.
Parameters
| Parameter | Type |
|---|---|
event | ComponentPointerEvent |
Returns
boolean | void
layoutTweens()?
optional layoutTweens(from, to): readonly LayoutTween[];Experimental
Layout transitions (E7.3, E7.5): attributes the view animates with its own interpolation (a 3D camera orbits rather than moving in a straight line), from what it shows now to the defaulted layout to. The transition writes each tween's value at path on every frame.
Parameters
| Parameter | Type |
|---|---|
from | FullLayout |
to | FullLayout |
Returns
readonly LayoutTween[]
selectArea()?
optional selectArea(x, y): SelectArea | undefined;Experimental
Box / lasso selection on a non-cartesian subplot the view draws (E6.3, polar): the subplot under container (x, y) when a select / lasso drag may start there. The runtime then runs the selection over the rect (the drag is clamped to it) with the visible traces whose subplot attribute is the area's id; their selectPoints get container px queries. Plotly keeps no layout.selections for these subplots.
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
SelectArea | undefined
update()
update(ctx, plan): void;Experimental
Parameters
| Parameter | Type |
|---|---|
ctx | ComponentDrawContext |
plan | ComponentUpdatePlan |
Returns
void