Options
All
  • Public
  • Public/Protected
  • All
Menu
summary

Point-marker type which renders a custom image provided by {@link HTMLImageElement} at each x-y datapoint location

remarks

To apply the SpritePointMarker to a IRenderableSeries, use the following code:

import {createImageAsync} from "SCICHART_ROOT/src/utils/imageUtil";
import customPointImage from "./CustomMarkerImage.png";

const sciChartSurface: SciChartSurface;
const wasmContext: TSciChart;
const imageBitmap = await createImageAsync(customPointImage);
sciChartSurface.renderableSeries.add(new FastLineRenderableSeries(wasmContext, {
             pointMarker: new SpritePointMarker(wasmContext, {
                 image: imageBitmap
             })
}));

Hierarchy

Implements

Index

Constructors

constructor

Properties

fillOriginalValue

fillOriginalValue: string

The {@link TSciChart | SciChart 2D WebAssembly Context} containing native methods and access to our WebGL2 Engine and WebAssembly numerical methods

invalidateParentCallback

invalidateParentCallback: () => void

Callback to invalidate the parent 2D SciChartSurface

Type declaration

    • (): void
    • Returns void

strokeOriginalValue

strokeOriginalValue: string

Protected webAssemblyContext

webAssemblyContext: TSciChart

Accessors

fill

  • get fill(): string
  • set fill(fill: string): void
  • Gets or sets the point-marker fill as an HTML Color Code

    Returns string

  • Gets or sets the point-marker fill as an HTML Color Code

    Parameters

    • fill: string

    Returns void

height

  • get height(): number
  • set height(height: number): void
  • Gets or sets the height of the point-marker in pixels

    Returns number

  • Gets or sets the height of the point-marker in pixels

    Parameters

    • height: number

    Returns void

image

  • get image(): HTMLImageElement
  • set image(image: HTMLImageElement): void
  • Gets or sets the image to draw at each x-y point as an {@link HTMLImageElement}

    Returns HTMLImageElement

  • Gets or sets the image to draw at each x-y point as an {@link HTMLImageElement}

    Parameters

    • image: HTMLImageElement

    Returns void

opacity

  • set opacity(opacity: number): void
  • Gets or sets the opacity of the point-marker

    Parameters

    • opacity: number

    Returns void

stroke

  • get stroke(): string
  • set stroke(stroke: string): void
  • Gets or sets the point-marker stroke as an HTML Color Code

    Returns string

  • Gets or sets the point-marker stroke as an HTML Color Code

    Parameters

    • stroke: string

    Returns void

strokeThickness

  • get strokeThickness(): number
  • set strokeThickness(strokeThickness: number): void
  • Gets or sets the stroke-thickness of the point-marker in pixels

    Returns number

  • Gets or sets the stroke-thickness of the point-marker in pixels

    Parameters

    • strokeThickness: number

    Returns void

width

  • get width(): number
  • set width(width: number): void
  • Gets or sets the width of the point-marker in pixels

    Returns number

  • Gets or sets the width of the point-marker in pixels

    Parameters

    • width: number

    Returns void

Methods

createCanvasTexture

delete

  • delete(): void
  • Deletes native (WebAssembly) memory used by this type, after which it cannot be used.

    remarks

    Call .delete() before finishing with the object to ensure that WebAssmembly memory leaks do not occur.

    All elements within SciChart's High Performance Realtime JavaScript Charts which implement IDeletable must be deleted manually to free native (WebAssembly) memory

    Returns void

drawSprite

  • drawSprite(canvas: CanvasRenderingContext2D, spriteWidth: number, spriteHeight: number, stroke: string, strokeThickness: number, fill: string): void
  • When overridden in a derived class, draw once the point-marker to the {@link CanvasRenderingContext2D}. This will create a sprite (image or bitmap) which will be repeated at each xy data-value using our fast WebGL WebAssembly graphics engine

    Parameters

    • canvas: CanvasRenderingContext2D

      the {@link CanvasRenderingContext2D} to draw to

    • spriteWidth: number

      the sprite target width

    • spriteHeight: number

      the sprite target height

    • stroke: string

      the stroke color

    • strokeThickness: number

      the thickness of the stroke

    • fill: string

      the fill color

    Returns void

getFillMask

getSprite

getStrokeMask

Protected notifyPropertyChanged

  • notifyPropertyChanged<PropertyType>(propertyName: string, newValue: PropertyType, oldValue: PropertyType): void
  • Notifies listeners to invalidateParentCallback that a property has changed and redraw is required

    Type parameters

    • PropertyType

    Parameters

    • propertyName: string

      the property name

    • newValue: PropertyType
    • oldValue: PropertyType

    Returns void

Generated using TypeDoc