scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
92 lines (91 loc) • 6.69 kB
TypeScript
import { ObservableArray } from "../../Core/ObservableArray";
import { ESciChartSurfaceType } from "../../types/SciChartSurfaceType";
import { ESurfaceType } from "../../types/SurfaceType";
import { TSciChart } from "../../types/TSciChart";
import { PolarAxisBase } from "./Axis/Polar/PolarAxisBase";
import { I2DPolarSurfaceOptions, I2DSurfaceOptions } from "./I2DSurfaceOptions";
import { ISciChartSurfaceOptions, SciChartSurface, TWebAssemblyChart } from "./SciChartSurface";
export interface ISciChartPolarSurface {
/**
* @summary Gets the collection of {@link PolarAxisBase} - the X Axis on a {@link SciChartPolarSurface}
* @description A {@link SciChartPolarSurface} can have one to many {@link PolarAxisBase | XAxes}.
*
* A Polar Axis must be either Angular (around the circumference) or Radial (distance from the center) by setting {@link PolarAxisBase.isAngluar}.
* The X Axis can be angular or radial, but there must be a y axis of the other sort and each series must refer to one radial and one angular axis.
*
* {@link AxisBase2D.axisAlignment} affects where the axis title is placed for an angular axis.
* {@link AxisBase2D.isInnerAxis} works as expected for the angular axis. For the radial axis, isInnerAxis determines which side the ticks and labels are placed.
* isInnerAxis: false means clockwise of the radial line (ie below the horizontal line to the right for the default with startAngle:0). isInnerAxis: true means anticlockwise
*
* Series and annotations may be linked to an axis via the {@link AxisCore.id}, {@link BaseRenderableSeries.xAxisId} and
* {@link AnnotationBase.xAxisId} property.
* @remarks
* Adding an Axis to the chart causes it to automatically redraw. Note that Axis by default do not zoom to fit data.
* See the {@link AxisBase2D.autoRange} property for more information.
*/
readonly xAxes: ObservableArray<PolarAxisBase>;
/**
* @summary Gets the collection of {@link PolarAxisBase} - the Y Axis on a {@link SciChartPolarSurface}
* @description A {@link SciChartPolarSurface} can have one to many {@link PolarAxisBase | YAxes}.
*
* A Polar Axis must be either Angular (around the circumference) or Radial (distance from the center) by setting {@link PolarAxisBase.isAngluar}.
* The Y Axis can be angular or radial, but there must be a y axis of the other sort and each series must refer to one radial and one angular axis.
*
* {@link AxisBase2D.axisAlignment} affects where the axis title is placed for an angular axis.
* {@link AxisBase2D.isInnerAxis} works as expected for the angular axis. For the radial axis, isInnerAxis determines which side the ticks and labels are placed.
* isInnerAxis: false means clockwise of the radial line (ie below the horizontal line to the right for the default with startAngle:0). isInnerAxis: true means anticlockwise
*
* Series and annotations may be linked to an axis via the {@link AxisCore.id}, {@link BaseRenderableSeries.yAxisId} and
* {@link AnnotationBase.yAxisId} property.
* @remarks
* Adding an Axis to the chart causes it to automatically redraw. Note that Axis by default do not zoom to fit data.
* See the {@link AxisBase2D.autoRange} property for more information.
*/
readonly yAxes: ObservableArray<PolarAxisBase>;
}
/**
* @summary The {@link SciChartPolarSurface} is the root 2D Polar Chart control in SciChart's High Performance Real-time
* {@link https://www.scichart.com/javascript-chart-features | JavaScript Chart Library}
* @description
* To create a polar chart using SciChart, declare a {@link SciChartPolarSurface} using {@link SciChartPolarSurface.create},
* add X and Y axes to the {@link SciChartPolarSurface.xAxes} {@link SciChartPolarSurface.yAxes} collection.
*
* Next, add a polar series to the {@link SciChartPolarSurface.renderableSeries} collection.
*
* You can add annotations and markers using the {@link SciChartPolarSurface.annotations} property, and you can add zoom and pan behaviours,
* tooltips and more by using the {@link SciChartPolarSurface.chartModifiers} property.
*
* To redraw a {@link SciChartPolarSurface} at any time, call {@link SciChartPolarSurface.invalidateElement}, however all properties are reactive and the
* chart will automatically redraw if data or properties change.
* @remarks
* It is possible to have more than one {@link SciChartPolarSurface} on screen at the same time.
* {@link SciChartPolarSurface | SciChartPolarSurfaces} scale to fit the parent DIV where they are hosted. Use CSS to position the DIV.
*/
export declare class SciChartPolarSurface extends SciChartSurface implements ISciChartPolarSurface {
/**
* Creates a {@link SciChartPolarSurface} and {@link TSciChart | WebAssembly Context} to occupy the div by element ID in your DOM.
* @remarks This method is async and must be awaited
* @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
* @param options Optional - Optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
*/
static create(divElement: string | HTMLDivElement, options?: I2DPolarSurfaceOptions): Promise<TWebAssemblyChart<SciChartPolarSurface>>;
/**
* Performs a similar operation to {@link SciChartPolarSurface.create} but uses a dedicated WebAssembly context for this chart, and draws directly to the target canvas
* This provides better performance for a single chart, but there is a limit (16) to how many you can have on one page.
* If you need large numbers of charts all updating at the same time, use this, together with {@link addSubChart} to create many charts on one surface.
* @param divElement The Div Element ID or reference where the {@link SciChartSurface} will reside
* @param options - optional parameters for chart creation. See {@link I2DSurfaceOptions} for more details
*/
static createSingle(divElement: string | HTMLDivElement, options?: I2DSurfaceOptions): Promise<TWebAssemblyChart<SciChartPolarSurface>>;
/** @inheritDoc */
get surfaceType(): ESurfaceType;
private static createPolarTest;
/** @inheritDoc */
readonly xAxes: ObservableArray<PolarAxisBase>;
/** @inheritDoc */
readonly yAxes: ObservableArray<PolarAxisBase>;
constructor(webAssemblyContext: TSciChart, options?: ISciChartSurfaceOptions);
toJSON(excludeData?: boolean): {
type: ESciChartSurfaceType;
} & import("../..").ISciChart2DDefinition;
}