scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
53 lines (52 loc) • 2.25 kB
TypeScript
import { Point } from "../../../Core/Point";
import { HitTestInfo } from "../../Visuals/RenderableSeries/HitTest/HitTestInfo";
import { IRenderableSeries } from "../../Visuals/RenderableSeries/IRenderableSeries";
import { EDataSeriesType } from "../IDataSeries";
/**
* SeriesInfo is a data-structure which provides enriched information about a hit-test operation.
* It's derived by calling {@link BaseRenderableSeries.hitTestProvider.hitTest} (returns {@link HitTestInfo}) and then
* enriched by calling {@link BaseRenderableSeries.getSeriesInfo}. There is a class hierachy for {@link SeriesInfo} which
* is a different class depending on series type, e.g. line, mountain, scatter series has {@link XySeriesInfo},
* heatmap series as {@link HeatmapSeriesInfo} etc.
*/
export declare class SeriesInfo {
/**
* Gets the associated {@link IRenderableSeries | RenderableSeries} that this {@link SeriesInfo} was generated by
*/
readonly renderableSeries: IRenderableSeries;
fill: string;
/**
* Gets the {@link EDataSeriesType} of the {@link BaseDataSeries | DataSeries} which is the result of the hit-test operation
*/
dataSeriesType: EDataSeriesType;
stroke: string;
/**
* Gets the name of the {@link BaseDataSeries | DataSeries} which is the result of the hit-test operation
*/
seriesName: string;
hitTestPointValues: Point;
xValue: number;
point2xValue: number;
yValue: number;
point2yValue: number;
xCoordinate: number;
yCoordinate: number;
point2xCoordinate: number;
point2yCoordinate: number;
isHit: boolean;
dataSeriesIndex: number;
distance: number;
/**
* When true the hit-test operation was within the first and the last DataSeries X-values
*/
isWithinDataBounds: boolean;
pointMetadata: unknown;
point2metadata: unknown;
constructor(renderableSeries: IRenderableSeries, hitTestInfo: HitTestInfo);
get isVisible(): boolean;
get formattedYValue(): string;
get formattedXValue(): string;
getYCursorFormattedValue(value: number): string;
getXCursorFormattedValue(value: number): string;
equals(other: SeriesInfo): boolean;
}