MAIDR JavaScript API
    Preparing search index...

    The boxes drawn over a Lightweight Charts chart to show the reader's position to anyone watching the screen.

    Index

    Constructors

    • Parameters

      • host: HTMLElement

        The positioned wrapper holding the chart

      • target: HTMLElement

        The chart element the overlay covers

      • getColor: () => string

        Returns the highlight color, read at every draw

      • OptionalonReader: () => void

        Called when a reader of the pixels arrives, so the copy it needs is taken then rather than at the next move

      Returns HighlightOverlay

    Methods

    • Keeps a copy of the whole chart on one canvas for readers of the pixels -- the tactile display; see @util/overlayRegions.

      Lightweight Charts gives every pane and every axis a canvas of its own, so on a chart of two panes no single canvas covers enough of it to be read as the chart. The copy is the chart as one picture, without the crosshair. It is taken only while something reads the pixels, so a chart nobody reads that way does not pay for a screenshot per move.

      Parameters

      • screenshot: () => HTMLCanvasElement

        Draws the chart onto a new canvas

      Returns void