scichart
Version:
Fast WebGL JavaScript Charting Library and Framework
94 lines (93 loc) • 3.75 kB
TypeScript
import { TPointMarkerDefinition3D } from "../../../Builder/buildSeries";
import { EventHandler } from "../../../Core/EventHandler";
import { PropertyChangedEventArgs } from "../../../Core/PropertyChangedEventArgs";
import { EPointMarker3DType } from "../../../types/PointMarker3DType";
import { TSciChart3D } from "../../../types/TSciChart3D";
import { IPointMarker3D } from "./IPointMarker3D";
/**
* Defines the BasePointMarker3D geometry type: a pixel, a textured-quad or a 3D object (Instanced Mesh)
*/
export declare enum EMarkerType {
/**
* Each marker rendered as a single pixel
*/
Pixel = "Pixel",
/**
* each marker rendered as a textured quad
*/
TexturedQuad = "TexturedQuad",
/**
* each marker rendered as an instanced mesh
*/
InstancedMesh = "InstancedMesh"
}
/**
* Options passed to {@link BasePointMarker3D} at construction, used to configure the point-marker
*/
export interface IBasePointMarker3DOptions {
/**
* The fill of the point-marker as an HTML color code
*/
fill?: string;
/**
* The size of the point-marker in world-coordinates
*/
size?: number;
}
/**
* @summary The Base class for a 3D PointMarker in SciChart - High Performance
* {@link https://www.scichart.com/javascript-chart-features | JavaScript 3D Charts}.
* @description PointMarkers may be displayed on {@link IRenderableSeries3D |3D Renderable Series} to add scatter-points to 3D charts.
* For example: setting the {@link ScatterRenderableSeries3D.pointMarker} property property
* will render a point at each xyz data-value
* @remarks
* See derived types of {@link BasePointMarker3D} for specific point-marker types.
*/
export declare abstract class BasePointMarker3D implements IPointMarker3D {
abstract type: EPointMarker3DType;
/**
* Event handler which informs subscribers that a property has changed and the surface needs redrawing
*/
readonly propertyChanged: EventHandler<PropertyChangedEventArgs>;
/**
* The {@link TSciChart3D | SciChart 3D WebAssembly Context} containing native methods and
* access to our WebGL2 Engine and WebAssembly numerical methods
*/
protected readonly webAssemblyContext: TSciChart3D;
private fillProperty;
private sizeProperty;
/**
* Creates an instance of the {@link BasePointMarker3D}
* @param webAssemblyContext The {@link TSciChart3D | SciChart 3D WebAssembly Context} containing native methods and
* access to our WebGL2 Engine and WebAssembly numerical methods
* @param options Optional parameters of type {@link IBasePointMarker3DOptions} used to configure the point-marker
* @protected
*/
protected constructor(webAssemblyContext: TSciChart3D, options?: IBasePointMarker3DOptions);
/**
* Gets or sets the point-marker fill as an HTML Color Code
*/
get fill(): string;
/**
* Gets or sets the point-marker fill as an HTML Color Code
*/
set fill(fill: string);
/**
* Gets or sets the size of the point-marker in world coordinates
*/
get size(): number;
/**
* Gets or sets the size of the point-marker in world coordinates
*/
set size(size: number);
/**
* Defines the MarkerType, e.g. pixel point marker, Mesh (3d object) or textured-quad
*/
abstract get markerType(): EMarkerType;
/**
* Notifies listeners to {@link propertyChanged} that a property has changed and redraw is required
* @param propertyName the property name
*/
protected notifyPropertyChanged(propertyName: string): void;
toJSON(): TPointMarkerDefinition3D;
}