scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
194 lines (193 loc) • 8.09 kB
TypeScript
import { GradientParams } from "../../../Core/GradientParams";
import { NumberRange } from "../../../Core/NumberRange";
import { EDataPointWidthMode } from "../../../types/DataPointWidthMode";
import { ESeriesType } from "../../../types/SeriesType";
import { TSciChart } from "../../../types/TSciChart";
import { IPaletteProvider } from "../../Model/IPaletteProvider";
import { IBoxPlotPointSeries } from "../../Model/PointSeries/IPointSeries";
import { ResamplingParams } from "../../Numerics/Resamplers/ResamplingParams";
import { IThemeProvider } from "../../Themes/IThemeProvider";
import { BaseRenderableSeries } from "./BaseRenderableSeries";
import { IHitTestProvider } from "./HitTest/IHitTestProvider";
import { IBaseRenderableSeriesOptions } from "./IBaseRenderableSeriesOptions";
declare type TStrokeProperties = {
/**
* The stroke for the element
* @remarks Acceptable values include RGB format e.g. ```#FF0000```, RGBA format e.g. ```#FF000077`` and RGBA format e.g. ```rgba(255,0,0,0.5)```
*/
stroke?: string;
/**
* The stroke thickness for the element
*/
strokeThickness?: number;
/**
* The StrokeDashArray defines the stroke or dash pattern for the line.
* Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
*/
strokeDashArray?: number[];
};
declare type TCapProperty = TStrokeProperties & {
/**
* The width of caps.
* By default the value is treated as relative, valid values range from 0.0 - 1.0.
* To specify if the value should be treated as relative, absolute, or based on range use {@link dataPointWidthMode}
*/
dataPointWidth?: number;
};
/**
* Options to pass to the {@link FastBoxPlotRenderableSeries} constructor
*/
export interface IFastBoxPlotRenderableSeriesOptions extends IBaseRenderableSeriesOptions {
/**
* Sets the mode which determines how dataPointWidth is interpreted. Available values are {@link EDataPointWidthMode}. Default Relative.
*/
dataPointWidthMode?: EDataPointWidthMode;
/**
* Sets cap properties for {@link FastBoxPlotRenderableSeries}
*/
cap?: TCapProperty;
/**
* Sets whiskers properties for {@link FastBoxPlotRenderableSeries}
*/
whiskers?: TStrokeProperties;
/**
* Sets median line properties for {@link FastBoxPlotRenderableSeries}
*/
medianLine?: TStrokeProperties;
/**
* The width of the box.
* By default the value is treated as relative, valid values range from 0.0 - 1.0.
* To specify if the value should be treated as relative, absolute, or based on range use {@link dataPointWidthMode}
*/
dataPointWidth?: number;
/**
* The stroke for the box
*/
stroke?: string;
/**
* The stroke thickness for the box
*/
strokeThickness?: number;
/**
* The StrokeDashArray defines the stroke or dash pattern for the box.
* Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
*/
strokeDashArray?: number[];
/**
* The box fill as an HTML color code
*/
fill?: string;
/**
* Sets the fill as a gradient brush
*/
fillLinearGradient?: GradientParams;
}
/**
* Defines an Box Plot Series or Box Plot chart type in the SciChart's High Performance Real-time
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
* @remarks
* To add a line series to a {@link SciChartSurface} you need to declare both the {@link FastBoxPlotRenderableSeries | RenderableSeries}
* and a {@link BoxPlotDataSeries | DataSeries}. Simplified code sample below:
*
* ```ts
* const sciChartSurface: SciChartSurface;
* const wasmContext: TSciChart;
* // Create and fill the dataseries
* const dataSeries = new BoxPlotDataSeries(wasmContext);
* dataSeries.append(4.5, 0, 10, 4.5, 3, 7);
* dataSeries.append(5.5, 1, 9, 5.5, 4, 6);
* // Create the renderableSeries
* const boxPlotSeries = new FastBoxPlotRenderableSeries(wasmContext);
* boxPlotSeries.dataSeries = dataSeries;
* // append to the SciChartSurface
* sciChartSurface.renderableSeries.add(boxPlotSeries);
* ```
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/fast-box-plot-renderable-series/}
*/
export declare class FastBoxPlotRenderableSeries extends BaseRenderableSeries {
readonly type = ESeriesType.BoxPlotSeries;
private dataPointWidthModeProperty;
private capProperty;
private whiskersProperty;
private medianLineProperty;
private dataPointWidthProperty;
private strokeDashArrayProperty;
private fillProperty;
private fillLinearGradientProperty;
/**
* Creates an instance of the {@link FastBoxPlotRenderableSeries}
* @param webAssemblyContext The {@link TSciChart | SciChart WebAssembly Context} containing
* native methods and access to our WebGL2 WebAssembly Drawing Engine
* @param options optional parameters of type {@link IFastBoxPlotRenderableSeriesOptions} applied when constructing the series type
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/fast-box-plot-renderable-series/}
*/
constructor(webAssemblyContext: TSciChart, options?: IFastBoxPlotRenderableSeriesOptions);
/** @inheritDoc */
applyTheme(themeProvider: IThemeProvider): void;
/**
* Gets or sets the mode which determines how dataPointWidth is interpreted. Available values are {@link EDataPointWidthMode}. Default Relative.
*/
get dataPointWidthMode(): EDataPointWidthMode;
set dataPointWidthMode(value: EDataPointWidthMode);
/**
* Gets or sets cap properties for {@link FastBoxPlotRenderableSeries}
*/
get cap(): Required<TCapProperty>;
set cap(value: TCapProperty);
/**
* Gets or sets whiskers properties for {@link FastBoxPlotRenderableSeries}
*/
get whiskers(): Required<TStrokeProperties>;
set whiskers(value: TStrokeProperties);
/**
* Gets or sets median line properties for {@link FastBoxPlotRenderableSeries}
*/
get medianLine(): Required<TStrokeProperties>;
set medianLine(value: TStrokeProperties);
/**
* The width of the box.
* By default the value is treated as relative, valid values range from 0.0 - 1.0.
* To specify if the value should be treated as relative, absolute, or based on range use {@link dataPointWidthMode}
*/
get dataPointWidth(): number;
set dataPointWidth(value: number);
/**
* The StrokeDashArray defines the stroke or dash pattern for the box.
* Accepts an array of values, e.g. [2,2] will have a line of length 2 and a gap of length 2.
*/
get strokeDashArray(): number[];
set strokeDashArray(strokeDashArray: number[]);
/**
* The box fill as an HTML color code
*/
get fill(): string;
set fill(htmlColorCode: string);
/**
* Gets or sets the fill as a gradient brush
*/
get fillLinearGradient(): GradientParams;
set fillLinearGradient(gradientBrushParams: GradientParams);
/**
* Gets or sets the paletteProvider of Renderable Series
* @remarks paletteProvider is not supported by {@link FastBoxPlotRenderableSeries}
*/
get paletteProvider(): IPaletteProvider;
set paletteProvider(paletteProvider: IPaletteProvider);
/** @inheritDoc */
delete(): void;
/** @inheritDoc */
getXRange(): NumberRange;
/** @inheritDoc */
getYRange(xVisibleRange: NumberRange, isXCategoryAxis?: boolean): NumberRange;
/** @inheritDoc */
toJSON(excludeData?: boolean): import("../../..").TSeriesDefinition;
/** @inheritDoc */
toPointSeries(rp?: ResamplingParams): IBoxPlotPointSeries;
/** @inheritDoc */
protected newHitTestProvider(): IHitTestProvider;
}
export {};