scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
123 lines (122 loc) • 5.92 kB
TypeScript
import { IRenderableSeries, NumberRange } from "../../../..";
import { GradientParams } from "../../../../Core/GradientParams";
import { ESeriesType } from "../../../../types/SeriesType";
import { TSciChart } from "../../SciChartSurface";
import { BaseBandRenderableSeries, IBaseBandRenderableSeriesOptions } from "../BaseBandRenderableSeries";
import { ELineType, ILineRenderableSeries } from "../BaseLineRenderableSeries";
import { IPolarLineRenderableSeriesOptions } from "./PolarLineRenderableSeries";
/**
* Optional parameters passed to the constructor of {@link PolarBandRenderableSeries}
*/
export interface IPolarBandRenderableSeriesOptions extends IBaseBandRenderableSeriesOptions {
/**
* Sets the interpolation flag for line segments. If False each line segment draws normally. If True each line segments draws as an arc.
*/
interpolateLine?: boolean;
/**
* Sets the flag to scale gradient along the Y data-range. For Y Radial axis if False gradient starts at the circle center
* and ends at the the circle edge. However, if True the gradient starts at min Y value and ends and max Y value for every arc segment.
*/
scaleGradientToYRange?: boolean;
}
/**
* @summary Defines the interface to a Render Polar Band Series (or Chart Type) in SciChart's High Performance Real-time
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
* @remarks
* A RenderableSeries defines how data should be rendered. e.g. as a Polar Band series etc...
* This is independent from the {@link BaseDataSeries | DataSeries} which stores the data to render
*
* See derived types of {@link BaseDataSeries} to find out what data-series are available.
* See derived types of {@link IPolarBandRenderableSeries} to find out what 2D JavaScript Chart types are available.
*/
export interface IPolarBandRenderableSeries extends IRenderableSeries {
/**
* Fill color where Y is greater than Y1
*/
fill: string;
/**
* Fill color where Y1 is greater than Y
*/
fillY1?: string;
/**
* Linear gradient params where Y is greater than Y1
*/
fillLinearGradient?: GradientParams;
/**
* Linear gradient params where Y1 is greater than Y
*/
fillLinearGradientY1?: GradientParams;
/**
* Gets or sets zeroLineY for {@link @PolarMountainRenderableSeries}
*/
zeroLineY?: number;
/**
* Gets or sets the flag to scale gradient along the Y data-range. For Y Radial axis if False gradient starts at the circle center
* and ends at the the circle edge. However, if True the gradient starts at min Y value and ends and max Y value for every arc segment.
*/
scaleGradientToYRange?: boolean;
}
/**
* Defines a JavaScript Polar Band-series or High-Low polygon fill chart type in the SciChart's High Performance Real-time
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts}
* @remarks
* To add a polar band series to a {@link SciChartPolarSurface} you need to declare both the {@link PolarBandRenderableSeries}
* and a {@link XyyDataSeries}. Simplified code sample below:
*
* ```ts
* const { sciChartSurface, wasmContext } = SciChartPolarSurface.create(rootId);
*
* // Create the renderableSeries
* const polarBandSeries = new PolarBandRenderableSeries(wasmContext, {
* dataSeries: new XyyDataSeries(wasmContext, {
* xValues: [1, 2, 3],
* yValues: [3, 2, 4],
* y1Values: [3, 4, 3]
* }),
* stroke: "#FFF"
* });
* // append to the SciChartSurface
* sciChartPolarSurface.renderableSeries.add(polarBandSeries);
* ```
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/polar-band-renderable-series/}
*/
export declare class PolarBandRenderableSeries extends BaseBandRenderableSeries implements ILineRenderableSeries, IPolarBandRenderableSeries {
readonly isPolar: boolean;
readonly type = ESeriesType.PolarBandSeries;
readonly lineType: ELineType;
clipToTotalAngle: boolean;
private scaleGradientToYRangeProperty;
private interpolateLineProperty;
/**
* Creates an instance of the {@link PolarBandRenderableSeries}
* @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 IPolarBandRenderableSeriesOptions} applied when constructing the series type
*
* ---
* 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-types/polar-band-renderable-series/}
*/
constructor(webAssemblyContext: TSciChart, options?: IPolarBandRenderableSeriesOptions);
/** @inheritDoc */
get isDigitalLine(): boolean;
/**
* Gets or sets the flag to scale gradient along the Y data-range. For Y Radial axis if False gradient starts at the circle center
* and ends at the the circle edge. However, if True the gradient starts at min Y value and ends and max Y value for every arc segment.
*/
get scaleGradientToYRange(): boolean;
set scaleGradientToYRange(value: boolean);
/**
* Gets or sets the interpolation flag for line segments. If False each line segment draws normally.
* If True each line segment draws as an arc.
*/
get interpolateLine(): boolean;
set interpolateLine(value: boolean);
/** @inheritDoc */
getIndicesRange(xRange: NumberRange, isCategoryData?: boolean): NumberRange;
/** @inheritDoc */
toJSON(excludeData?: boolean): import("../../../..").TSeriesDefinition;
/** @inheritDoc */
protected addDrawingProviders(webAssemblyContext: TSciChart, options?: IPolarLineRenderableSeriesOptions): void;
}