ReadonlyidStable id used for detach and hit-test routing.
ReadonlyzPaint tier.
Paint the primitive. Should self-clip if it must stay inside the chart.
priceFormat is the chart's host-supplied price formatter (from
ChartConfig.priceFormat), so primitives that render a price label
(e.g. price lines) match the axis/crosshair formatting instead of
falling back to the library default.
OptionalpriceFormat: (price: number) => stringOptional pointer hit-test in CSS pixels. Used to route drags (e.g. a draggable price line). Return true if (x, y) lands on the primitive.
A
'top'z-tier Primitive: a full-width horizontal line at a fixed price with a right-axis label pill, optionally draggable. Built on the F4 framework; positions viaviewport.priceToYso it stays correct under any price-scale mode (F1).Distinct from the
HorizontalLinedrawing tool — this is programmatic (created/updated by the host via a handle), not an interactive, undo/redo-tracked, persisted drawing.