UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

82 lines (81 loc) 3.69 kB
import { GradientParams } from "../../../../Core/GradientParams"; import { EDataPointWidthMode } from "../../../../types/DataPointWidthMode"; import { SCRTDoubleVector, TSciChart } from "../../../../types/TSciChart"; import { WebGlRenderContext2D } from "../../../Drawing/WebGlRenderContext2D"; import { IPointSeries } from "../../../Model/PointSeries/IPointSeries"; import { RenderPassData } from "../../../Services/RenderPassData"; import { TDpiChangedEventArgs } from "../../TextureManager/DpiHelper"; import { FastBoxPlotRenderableSeries } from "../FastBoxPlotRenderableSeries"; import { BaseSeriesDrawingProvider } from "./BaseSeriesDrawingProvider"; interface IBoxPlotSeriesDrawingProviderProperties { dataPointWidthMode: EDataPointWidthMode; capDataPointWidth: number; capStroke: string; capStrokeDashArray: number[]; capStrokeThickness: number; whiskersStroke: string; whiskersStrokeDashArray: number[]; whiskersStrokeThickness: number; medianStroke: string; medianStrokeDashArray: number[]; medianStrokeThickness: number; boxDataPointWidth: number; boxStroke: string; boxStrokeThickness: number; boxStrokeDashArray: number[]; boxFill: string; boxFillLinearGradient: GradientParams; opacity: number; } /** * Used internally - a drawing provider performs drawing for a {@link FastBoxPlotRenderableSeries} using * our WebAssembly WebGL rendering engine */ export declare class BoxPlotSeriesDrawingProvider extends BaseSeriesDrawingProvider<FastBoxPlotRenderableSeries> { private capPenCache; private whiskersPenCache; private medianLinePenCache; private boxPenCache; private boxFillBrushCache; private nativeBoxDrawingProvider; private boxArgs; private nativeLineDrawingProvider; private tempXVec; private tempYVec; private lineArgs; /** * Creates an instance of the {@link BoxPlotSeriesDrawingProvider} * @param webAssemblyContext The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and * access to our WebGL2 Engine and WebAssembly numerical methods * @param parentSeries the parent {@link FastBoxPlotRenderableSeries} which this drawing provider is attached to */ constructor(webAssemblyContext: TSciChart, parentSeries: FastBoxPlotRenderableSeries, ySelector?: (ps: IPointSeries) => SCRTDoubleVector, xSelector?: (ps: IPointSeries) => SCRTDoubleVector); /** @inheritDoc */ onAttachSeries(): void; /** @inheritDoc */ onDetachSeries(): void; getProperties(): IBoxPlotSeriesDrawingProviderProperties; /** @inheritDoc */ delete(): void; private drawBoxes; private drawWhiskers; private drawLines; /** * To remove this and prepareTempMedianVectors() we need to update native SCRTLineSegmentDrawingProvider to support * input of three vectors xVals, yVals, x1Vals where x1Vals are treated as length of the line segment in X direction centered in x,y */ private prepareTempCapVectors; /** * It would be nice to have a strokePosition parameter (above, equal, below) for horizontal and vertical lines for SCRTLineSegmentDrawingProvider * to support positioning the line above, below or equal to the value */ private prepareTempMedianVectors; /** @inheritDoc */ draw(renderContext: WebGlRenderContext2D, renderPassData: RenderPassData): void; /** @inheritDoc */ onDpiChanged(args: TDpiChangedEventArgs): void; /** @inheritDoc */ onSeriesPropertyChange(propertyName: string): void; private createBoxBrush; } export {};