@rekurt/openkline - v0.2.0
    Preparing search index...

    Class ComparePrimitive

    A 'normal' z-tier Primitive that plots one compare series as a normalized line over the main chart. Self-contained: positions every point by time (viewport.timeToX) so it aligns with the price series under any pan/zoom and even when its own timestamps don't match the main bars, and clips to the chart area (clipToChart). Y mapping:

    • 'percentage' / 'indexed' → the shared, self-scaling CompareScale so every normalized compare line is mutually comparable, independent of the main price axis.
    • 'price' → the main right price scale (viewport.priceToY), for the rare case the compare symbol shares the chart's price magnitude.

    Stable id compare:<seriesId> so the controller can detach it.

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    id: string

    Stable id used for detach and hit-test routing.

    zOrder: PrimitiveZOrder = 'normal'

    Paint tier.

    Accessors

    Methods

    • 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.

      Parameters

      Returns void