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

    Class VolumeProfileController

    C4 public entry point. Overlays a horizontal VolumeProfilePrimitive (volume binned by price over the visible window) on a chart through the host's primitive framework. Constructed explicitly by the host (new VolumeProfileController(chart)), which is exactly why volume profile adds nothing to the base bundle: the base chart never references this class.

    Usage:

    import { VolumeProfileController } from '@rekurt/openkline-core';
    const vp = new VolumeProfileController(chart);
    vp.show({ bins: 30, side: 'right' });
    // ... user pans/zooms; the profile recomputes from the visible window ...
    vp.update(); // repaint after external data changes
    vp.hide();

    The primitive reads the visible window live via host.visibleCandleView(), so panning/zooming reshapes the profile automatically on the chart's own render cycle — update() is only needed to force a repaint after data arrives without user interaction.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Show the volume profile (idempotent). On first call it attaches a fresh primitive; a repeat call re-applies opts to the existing one and repaints instead of stacking duplicates. The primitive pulls the visible window through a closure on the host, so it tracks pan/zoom for free.

      Parameters

      Returns void

    • Force a repaint of the profile from the current visible window. Use after the chart's data changes without a pan/zoom (which would repaint anyway). No-op when hidden.

      Returns void