UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

89 lines (88 loc) 3.42 kB
import { EventHandler } from "../../../Core/EventHandler"; import { PropertyChangedEventArgs } from "../../../Core/PropertyChangedEventArgs"; import { TSciChart3D } from "../../../types/TSciChart3D"; /** * 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 = 0, /** * each marker rendered as a textured quad */ TexturedQuad = 1, /** * each marker rendered as an instanced mesh */ InstancedMesh = 2 } /** * 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 { /** * 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; }