scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
34 lines (33 loc) • 2.59 kB
TypeScript
import { EColumnMode, EColumnYMode } from "../../../../types/ColumnMode";
import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart";
import { CoordinateCalculatorBase } from "../../../Numerics/CoordinateCalculators/CoordinateCalculatorBase";
export declare type TRectangleSeriesHitTestResult = {
isHit: boolean;
nearestPointIndex: number;
isWithinDataBounds: boolean;
xValue?: number;
yValue?: number;
x1Value?: number;
y1Value?: number;
};
/**
* Hit-test function for BoxSeries or PolarColumnSeries
* Only for sorted data without overlapping columns only for columnXMode = EColumnMode.Mid or EColumnMode.Start
* Using binary search, time complexity O(log(N))
*/
declare function hitTestForBoxSorted(wasmContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, yValues: SCRTDoubleVector, y1Values: SCRTDoubleVector | undefined, xHitCoord: number, yHitCoord: number, defaultY1: number, columnCoordWidth: number, columnXMode: EColumnMode, columnYMode: EColumnYMode, isPolar: boolean): TRectangleSeriesHitTestResult;
/**
* Hit-test function for BoxSeries or PolarColumnSeries
* Iterates over all data points, time complexity O(N)
*/
declare function hitTestForBoxUnsorted(wasmContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, x1Values: SCRTDoubleVector | undefined, yValues: SCRTDoubleVector, y1Values: SCRTDoubleVector | undefined, xHitCoord: number, yHitCoord: number, defaultY1: number, columnCoordWidth: number, columnXMode: EColumnMode, columnYMode: EColumnYMode, isVertical: boolean, isPolar: boolean): TRectangleSeriesHitTestResult;
/**
* Hit-tests BoxSeries and Polar Column Series
*/
declare function hitTestForBox(wasmContext: TSciChart, xCoordinateCalculator: CoordinateCalculatorBase, yCoordinateCalculator: CoordinateCalculatorBase, xValues: SCRTDoubleVector, x1Values: SCRTDoubleVector | undefined, yValues: SCRTDoubleVector, y1Values: SCRTDoubleVector | undefined, xHitCoord: number, yHitCoord: number, defaultY1: number, columnCoordWidth: number, columnXMode: EColumnMode, columnYMode: EColumnYMode, isVertical: boolean, isSorted: boolean, isPolar: boolean): TRectangleSeriesHitTestResult;
export declare const hitTestHelpersRectangleSeries: {
hitTestForBoxSorted: typeof hitTestForBoxSorted;
hitTestForBoxUnsorted: typeof hitTestForBoxUnsorted;
hitTestForBox: typeof hitTestForBox;
};
export {};