Home Reference Source
import LinearGauge from 'canvas-gauges/lib/LinearGauge.js'
public class | source

LinearGauge

Extends:

EventEmitterBaseGauge → LinearGauge

Minimalistic HTML5 Canvas Linear Gauge

Static Method Summary

Static Protected Methods
protected static

configure(options: *): *

Checks and updates gauge options properly

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

drawBox: *

Method Summary

Public Methods
public

Triggering linear gauge render on a canvas.

Inherited Summary

From class BaseGauge
public static get

Returns gauges version string

public static

ensureValue(value: *, min: number): number

Ensures value is proper number

public static

fromElement(element: HTMLElement)

Initializes gauge from a given HTML element (given element should be valid HTML canvas gauge definition)

public static

initialize(type: string, options: GenericOptions): *

Inject given gauge object into DOM

public static

mod(n: number, m: number): number

Corrects javascript modulus bug

protected static

configure(options: *): BaseGauge

Updates gauge options

public get

Returns current value of the gauge

public set

value(value: number): *

Sets new value for this gauge.

public
public
public

True if gauge has been drawn for the first time, false otherwise.

public

Gauge options

public

Gauge type class

public

Gauges version string

public

Performs destruction of this object properly

public abstract

Triggering gauge render on a canvas.

public

Updates gauge configuration options at runtime and redraws the gauge

Static Protected Methods

protected static configure(options: *): * source

Checks and updates gauge options properly

Override:

BaseGauge#configure

Params:

NameTypeAttributeDescription
options *

Return:

*

Public Constructors

public constructor(options: LinearGaugeOptions) source

Override:

BaseGauge#constructor

Params:

NameTypeAttributeDescription
options LinearGaugeOptions

Public Members

public drawBox: * source

Public Methods

public draw(): LinearGauge source

Triggering linear gauge render on a canvas.

Override:

BaseGauge#draw

Return:

LinearGauge