Skip to content

Documentation / @finchart/core / index / MarkersDecoration

Interface: MarkersDecoration ​

Defined in: packages/core/src/extensions/standard.ts:184

Markers whose items can be replaced after mounting — an order stream re-sets the list, one registration. plot.requestRender() after a change is the caller's.

Extends ​

Methods ​

axisBadges()? ​

optional axisBadges(context): AxisBadge[]

Defined in: packages/core/src/plot/decoration.ts:110

Describes something to place on the axis — a crosshair value box, a price-line label.

The reason it's described rather than drawn is layering. When tick labels are DOM, a box drawn on canvas can't cover them — whoever draws the ticks has to draw the badge too, for the overlap to come out right whether the path is DOM or canvas. A badge for an axis that isn't showing labels is dropped — drawing into space that doesn't exist would cover the data instead.

Parameters ​

context ​

PaneDecorationContext

Returns ​

AxisBadge[]

Inherited from ​

PaneDecoration.axisBadges


draw() ​

draw(target, context): void

Defined in: packages/core/src/plot/decoration.ts:98

Parameters ​

target ​

DrawTarget

context ​

PaneDecorationContext

Returns ​

void

Inherited from ​

PaneDecoration.draw


setItems() ​

setItems(items): void

Defined in: packages/core/src/extensions/standard.ts:190

Replaces the items wholesale. The candidate is checked first; a refused one leaves the current list as it was. The list is copied, the markers in it are not — they stay the caller's objects.

Parameters ​

items ​

readonly Marker[]

Returns ​

void