scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
175 lines (174 loc) • 5.97 kB
TypeScript
import { Point } from "../../../../Core/Point";
import { EDataSeriesType } from "../../../Model/IDataSeries";
import { IPointMetadata } from "../../../Model/IPointMetadata";
import { IRenderableSeries } from "../IRenderableSeries";
/**
* The HitTestInfo class contains properties about the data-point under the mouse when a Hit-Test operation is performed
*/
export declare class HitTestInfo {
/**
* The default empty {@link HitTestInfo} instance
*/
static empty(): HitTestInfo;
/**
* Euclidean distance between the hitTestPoint and the nearest data-point
*/
getEuclideanDistance(): number;
/**
* Gets the associated series that this {@link HitTestInfo} was generated by
*/
readonly associatedSeries: IRenderableSeries;
/**
* When true, the {@link HitTestInfo} is empty
*/
readonly isEmpty: boolean;
/**
* The name of the {@link BaseDataSeries | DataSeries} which is the result of the hit-test operation
*/
dataSeriesName: string;
/**
* The type {@link EDataSeriesType} of the {@link BaseDataSeries | DataSeries} which is the result of the hit-test operation
*/
dataSeriesType: EDataSeriesType;
/**
* A screen-coordinate point where hit test is performed relative to the seriesViewRect and premultiplied by {@link DpiHelper.PIXEL_RATIO}
*/
hitTestPoint: Point;
/**
* A data-coordinate point where hit test is performed
*/
hitTestPointValues: Point;
/**
* The index of the data-series that was hit
*/
dataSeriesIndex: number;
/**
* The index of the second data-series point when hit-test is performed for the series body
*/
point2dataSeriesIndex: number;
/**
* The X-coordinate result of the hit-test operation, Y-coordinate for vertical chart
*/
xCoord: number;
/**
* The X-coordinate result of the hit-test operation for the second data point, Y-coordinate for vertical chart
*/
point2xCoord: number;
/**
* The Y-coordinate result of the hit-test operation, X-coordinate for vertical chart
*/
yCoord: number;
/**
* The Y-coordinate result of the hit-test operation for the second data point, X-coordinate for vertical chart
*/
point2yCoord: number;
/**
* The Y1-coordinate result of the hit-test operation
*/
y1Coord: number;
/**
* The Y1-coordinate result of the hit-test operation for the second data point, X-coordinate for vertical chart
*/
point2y1Coord: number;
/**
* The X-value result of the hit-test operation
*/
xValue: number;
/**
* The X-value of category result of the hit-test operation for the second data point
*/
point2xValue: number;
/**
* The X-value of category result of the hit-test operation
*/
xCategoryValue: number;
/**
* The Y-value result of the hit-test operation
*/
yValue: number;
/**
* The Y-value result of the hit-test operation for the second data point
*/
point2yValue: number;
/**
* XYY Series only: the Y1-value result of the hit-test operation
*/
y1Value: number;
/**
* The Y1-value result of the hit-test operation for the second data point
*/
point2y1Value: number;
/**
* XYZ Series only: the Z-value result of the hit-test operation
*/
zValue: number;
/**
* The radius in pixels that was used for the hit-test operation
*/
hitTestRadius: number;
/**
* When true, the hit-test operation was a success
* For the hitTest method it means that a series body was hit,
* Line body for line series
* Scatter point for scatter series
* Mountain area for mountain series and stacked mountain series
* Candlestick body for candle series
* Column body for column series and stacked column series
* Band series body for band series
* Bubble for bubble series
* The entire heatmap for heatmap series
* For the hitTestDataPoint method it means that a data point was hit
* For the hitTestXSlice method is means that the click was within data bounds
*/
isHit: boolean;
/**
* OHLC Series only: the Open-value result of the hit-test operation
*/
openValue: number;
/**
* OHLC Series only: the High-value result of the hit-test operation
*/
highValue: number;
/**
* OHLC Series only: the Low-value result of the hit-test operation
*/
lowValue: number;
/**
* OHLC Series only: the Close-value result of the hit-test operation
*/
closeValue: number;
/**
* When true the hit-test operation was within the first and the last DataSeries X-values
*/
isWithinDataBounds: boolean;
/**
* When true, the parent {@link SciChartSurface} xAxis is a Category Axis
*/
isCategoryAxis: boolean;
/**
* Gets or sets the XIndex at the hit-test site
*/
heatmapXIndex: number;
/**
* Gets or sets the YIndex at the hit-test site
*/
heatmapYIndex: number;
/**
* Gets or sets the value at the hit-test site, found at heatmapXIndex, heatmapYIndex
*/
heatmapValue: number;
/**
* The point metadata from the associated data series, which is useful for
* displaying tooltips with additional information specific for the data point
*/
metadata: IPointMetadata;
/**
* The point metadata for the second data point
*/
point2metadata: IPointMetadata;
private distanceProperty;
/** The distance from the hitTest coordinate to the point */
get distance(): number;
set distance(value: number);
constructor(renderableSeries: IRenderableSeries, isEmpty?: boolean);
}