Options
All
  • Public
  • Public/Protected
  • All
Menu

Defines the base class to Hit-Test Providers: classes which performs hit-tests on series, returning data-values at X-Y mouse locations

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • new BaseHitTestProvider(parentSeries: TRenderableSeries, wasmContext: TSciChart): BaseHitTestProvider
  • Creates an instance of the BaseHitTestProvider

    Parameters

    • parentSeries: TRenderableSeries

      the parent RenderableSeries that this Hit-Test provider is attached to

    • wasmContext: TSciChart

      the {@link TSciChart | SciChart WebAssembly Context} containing native methods and access to our WebGL2 WebAssembly Drawing Engine

    Returns BaseHitTestProvider

Properties

Protected currentRenderPassData

currentRenderPassData: RenderPassData

Readonly parentSeries

parentSeries: TRenderableSeries

Protected webAssemblyContext

webAssemblyContext: TSciChart

Static Readonly DEFAULT_HIT_TEST_RADIUS

DEFAULT_HIT_TEST_RADIUS: number = 7.07

Methods

Protected getTranslatedHitTestPoint

  • getTranslatedHitTestPoint(x: number, y: number): Point
  • Parameters

    • x: number
    • y: number

    Returns Point

Abstract hitTest

  • hitTest(x: number, y: number, hitTestRadius?: number): HitTestInfo
  • description

    Performs a hit-test for series body at the specific mouse point (X,Y coordinate on the parent SciChartSurface), returning a HitTestInfo type with the results

    remarks

    For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    Parameters

    • x: number

      The mouse point X coordinate on the parent SciChartSurface. NOTE: For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    • y: number

      The mouse point Y coordinate on the parent SciChartSurface. NOTE: For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    • Optional hitTestRadius: number

      The radius in pixels to determine whether a mouse is over a data-point

    Returns HitTestInfo

hitTestDataPoint

  • hitTestDataPoint(x: number, y: number, hitTestRadius?: number): HitTestInfo
  • description

    Performs a hit-test for the data point at the specific mouse point (X,Y coordinate on the parent SciChartSurface), returning a HitTestInfo type with the results

    remarks

    For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    Parameters

    • x: number

      The mouse point X coordinate on the parent SciChartSurface. NOTE: For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    • y: number

      The mouse point Y coordinate on the parent SciChartSurface. NOTE: For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    • Default value hitTestRadius: number = BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS

      The radius in pixels to determine whether a mouse is over a data-point

    Returns HitTestInfo

hitTestForDataPointSelectionModifier

  • hitTestForDataPointSelectionModifier(x: number, y: number, hitTestRadius?: number): HitTestInfo
  • description

    Performs a hit-test for the DataPointSelectionModifier. This calls IHitTestProvider.hitTestDataPoint by default. The hitTestProvider for the renderableSeries can override this if different behaviour is desired, eg for columSeries we call hitTest instead. returns a HitTestInfo type with the results, Only for sorted values

    remarks

    For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    Parameters

    • x: number

      The mouse point X coordinate on the parent SciChartSurface. NOTE: For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    • y: number

      The mouse point Y coordinate on the parent SciChartSurface. NOTE: For Retina displays and Browser zoom, ensure that X,Y points are scaled by DpiHelper.PIXEL_RATIO

    • Default value hitTestRadius: number = BaseHitTestProvider.DEFAULT_HIT_TEST_RADIUS

      The radius in pixels to determine whether a mouse is over a data-point

    Returns HitTestInfo

hitTestXSlice

  • inheritdoc

    Parameters

    • x: number
    • y: number

    Returns HitTestInfo

update

  • description

    updates the current HitTestProvider with the latest renderPassData

    Parameters

    • renderPassData: RenderPassData

      the latest renderPassData from the parent series last draw operation

    Returns void

Generated using TypeDoc