Documentation / @finchart/core / index / TimeCursor
Interface: TimeCursor
Defined in: packages/core/src/extensions/crosshair.ts:219
A time-ghost cursor — a vertical line plus an x badge that carries over only "what time is it looking at right now" from another chart's cursor (the material syncCrosshair is built from). y is never carried over, since each chart has its own scale — mimicking a horizontal line here would be a lie.
It holds only a data x — the pixel conversion is asked of the mapping at draw time (x.toPixel), so it automatically stays right through pan/zoom and points at the same moment even on a chart with a different bar grid. It shares the crosshair's style tokens so it reads as the same family on screen.
Extends
Methods
axisBadges()?
optionalaxisBadges(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
Returns
Inherited from
PlotDecoration.axisBadges
draw()
draw(
target,context):void
Defined in: packages/core/src/plot/decoration.ts:98
Parameters
target
context
Returns
void
Inherited from
PlotDecoration.draw
follow()
follow(
x):void
Defined in: packages/core/src/extensions/crosshair.ts:221
The data x to follow — null once the cursor has left.
Parameters
x
number | null
Returns
void