Last updated

API / geotoolkit / gauges / NumericGauge / NumericGauge

Class: NumericGauge

gauges.NumericGauge.NumericGauge

A gauge which only displays value, name, and any custom components added.

Hierarchy

Table of contents

Constructors
Methods
addAlarmaddCssClassaddCustomComponent
addInvalidateHandleraddRegionapplyOpacity
applyResponsiveStylecheckCollisioncleanAlarms
cloneconnectStylecopyConstructor
disconnectStyledisplayRegionsdispose
enableClippingenableEventPropagationenumerateNodes
executefiltergetAlarm
getAlarmsgetAnimationgetAnimationStyle
getAnimationTimegetBackgroundStylegetBounds
getClassNamegetClipStylegetCss
getCssClassgetCssClassesgetCssTransform
getCustomComponentgetCustomComponentsgetFunctionRegistry
getIdgetInvalidateMethodgetLayoutStyle
getLocalTransformgetMarginsStylegetName
getNamePropertiesgetOpacitygetOpacityBlendMode
getParentgetPropertiesgetProperty
getPropertyKeysgetRegiongetRenderingFilter
getResponsiveStylegetRootgetScaleScrollStrategy
getSceneTransformgetTaggetValue
getValuePropertiesgetVisiblegetWorldTransform
getZIndexhasCssClasshasEventListener
hideRegionsinvalidateinvalidateParent
isDisposedisEventPropagationEnabledisNotificationEnabled
isSelectableisSilentnotify
offononParentChanged
onVisibilityChangedpostRenderingpreRendering
registerAnimationStyleremoveAlarmremoveCssClass
removeCustomComponentremoveInvalidateHandlerremoveRegion
renderrenderAsyncrotate
scalesetAnimationsetAnimationStyle
setAnimationTimesetBackgroundStylesetBounds
setClipStylesetCsssetCssClass
setCssTransformsetFunctionRegistrysetId
setLayoutStylesetLocalTransformsetMarginsStyle
setNamesetNamePropertiessetNotification
setOpacitysetPropertiessetProperty
setRegionSizesetRenderingFiltersetResponsiveStyle
setScaleScrollStrategysetSelectablesetSilent
setTagsetValuesetValueProperties
setVisiblesetZIndexshear
toStringtranslateunregisterAnimationStyle
updateSceneTransformationupdateStateupdateTimeStamp
enableSceneGraphNotificationfindParentgetClassName
isSceneGraphNotificationEnabled
Css Properties
Name Type Description
animationfunctionFunctionsName of an easing function in function registry which will define the animation behavior
animationtimenumber
backgroundBackgroundStyleOptionsProperties for rectangular background of the gauge
background-fillstylestringBackground fillstyle
background-fillstyleFillStyleBackground fillstyle
background-fillstyle-colorstringColor in CSS form
background-fillstyle-evenoddmodebooleanEven-odd fill mode
background-fillstyle-fillpatternPatternPattern
background-fillstyle-fillpattern-containernamestringAn optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself
background-fillstyle-fillpattern-patternnamestringName of this pattern for indexing
background-fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
background-fillstyle-foregroundstringForeground color
background-fillstyle-patternPatternPattern
background-linestylestringBackground linestyle
background-linestyleLineStyleBackground linestyle
background-linestyle-colorstringColor in CSS form
background-linestyle-fillstringOptional fill style to be used to fill lines generated with this style
background-linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
background-linestyle-linecapCapStyleThe line cap style
background-linestyle-linedashoffsetnumberLine dash offset of dashed line
background-linestyle-linejoinJoinStyleThe line join style
background-linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
background-linestyle-scalablebooleanTrue if width should depend on transformation
background-linestyle-unitstringOptional unit for the width
background-linestyle-widthnumber | stringThe line thickness
background-visiblebooleanBackground visibility
boundsRectBounds of the gauge in parent model limits. Will override x,y,widht,height
bounds-heightnumberHeight
bounds-readonlybooleanReadonly
bounds-widthnumberWidth
bounds-xnumberLeft
bounds-ynumberTop
clippingbooleanContainer group clipping
clipstyleClipStyleClipping style
clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
clipstyle-geometryGraphicsPathClipping geometry
clipstyle-geometry-boundsRectBounds
clipstyleGraphicsPathClipping style
cssclassstringThe css class name of this node
csscursorstringCSS cursor associated with node
cssstylestringCSS style to be applied to inserted elements
fillstylestringA new fill style
fillstyleFillStyleA new fill style
heightnumberHeight of the gauge in its parent model limits
idstring | numberId of the node, its a unique identifier
linestylestringLine style
linestyleLineStyleLine style
localtransformTransformationLocal transformation
localtransform-dxnumberX axis translation
localtransform-dynumberY axis translation
localtransform-xxnumberX scale
localtransform-xynumberXy skew
localtransform-yxnumberYx skew
localtransform-yynumberY scale
marginsnumber | stringIt has properties for specifying the margins for each side
namestringName of the node. It is often used for debugging purposes or to simplify queries
namestyleNameOptionsProperties of the test displaying name of the gauge
namestyle-alignmentAnchorTypeDefines where in the region the name text will be positioned
namestyle-colorstringColor of name text
namestyle-displaystrategyValueDisplayStrategiesA display strategy to define how the name text fits the region it is rendered in
namestyle-fontstringFont of name text
namestyle-positionRegionsRegion in which to render the name text
namestyle-propertiesOptionsSee
namestyle-properties-cssclassstringThe css class name of this node
namestyle-properties-idstring | numberId of the node, its a unique identifier
namestyle-properties-namestringName of the node. It is often used for debugging purposes or to simplify queries
namestyle-properties-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
namestyle-properties-taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
namestyle-properties-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
namestyle-properties-z-indexnumberDefine node z-index
namestyle-propertiesOptionsSee
namestyle-properties-clipstyleClipStyleClipping style
namestyle-properties-clipstyleGraphicsPathClipping style
namestyle-properties-csscursorstringCSS cursor associated with node
namestyle-properties-cssstylestringCSS style to be applied to inserted elements
namestyle-properties-localtransformTransformationLocal transformation
namestyle-properties-marginsnumber | stringIt has properties for specifying the margins for each side
namestyle-properties-opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
namestyle-properties-opacityblendmodeBlendModeNode opacity mode to blend it
namestyle-properties-scalescrollstrategyScaleScrollStrategyScale scroll strategy
namestyle-properties-scalescrollstrategy-enabledbooleanEnable flag
namestyle-properties-transformstringAdditional CSS transformation applied to node or 'none'
namestyle-properties-transformTransformationAdditional CSS transformation applied to node or 'none'
namestyle-propertiesOptionsSee
namestyle-properties-fillstylestringStyle applied on fill
namestyle-properties-fillstyleFillStyleStyle applied on fill
namestyle-properties-linestylestringStyle applied on outline
namestyle-properties-linestyleLineStyleStyle applied on outline
namestyle-propertiesOptionsSee
namestyle-properties-alignmentAnchorTypeAlignment according to the anchor point
namestyle-properties-axnumberAnchor x position
namestyle-properties-aynumberAnchor y position
namestyle-properties-heightnumberShape height
namestyle-properties-ispointingupbooleanDefines whether the shape is always pointing up
namestyle-properties-layoutstyleLayoutStyleLayout style to specify how to lay out shape
namestyle-properties-layoutstyle-constraintSizeConstraintLayout constrains
namestyle-properties-layoutstyle-flexgrownumberNumber specifying how much the item will grow relative to the rest of the items inside the same container
namestyle-properties-layoutstyle-flexshrinknumberNumber specifying how much the item will shrink relative to the rest of the items inside the same container
namestyle-properties-layoutstyle-floatstringFloat position
namestyle-properties-layoutstyle-positionstringLayout position
namestyle-properties-layoutstyle-sizenumber | stringLayout size
namestyle-properties-maxdimensionDimensionMaximum size for rendering
namestyle-properties-maxdimension-heightnumberHeight of dimension
namestyle-properties-maxdimension-widthnumberWidth of dimension or properties
namestyle-properties-mindimensionDimensionMinimum size for rendering
namestyle-properties-preserveaspectratiobooleanPreserve aspect ratio of the anchored shape
namestyle-properties-preservereadingorientationbooleanPreserve reading orientation for local transform
namestyle-properties-preserverightanglebooleanPreserve right angle for local transformation
namestyle-properties-rotationanglenumberRotation angle at anchor
namestyle-properties-sizeisindevicespacebooleanIs coordinate in device space
namestyle-properties-useminmaxdimensionsbooleanUse the min max dimensions to limit visual size
namestyle-properties-widthnumberShape width
namestyle-propertiesOptionsSee
namestyle-properties-autosizebooleanAutomatically fit shape bounds to text size, default is true Set it to false if you have more than one paragraph inside with different alignment
namestyle-properties-ellipsisstringstringString ellipsis that renders if ellipsis is true
namestyle-properties-paddingnumber
namestyle-properties-paddingstylenumber | stringInner padding style in device coordinates
namestyle-properties-radiusnumberBorder radius in device coordinates
namestyle-properties-showellipsisbooleanEllipsis flag
namestyle-properties-sizemodeSizeModeText size mode, default value depends on width and height settings
namestyle-properties-textstringText to display
namestyle-properties-textstylestringTextStyle to display
namestyle-properties-textstyleTextStyleTextStyle to display
namestyle-properties-textstyle-alignmentAlignmentStyleAlignment
namestyle-properties-textstyle-autosizebooleanAuto font size on high definition display
namestyle-properties-textstyle-backgroundstringBackground style
namestyle-properties-textstyle-backgroundFillStyleBackground style
namestyle-properties-textstyle-baselineBaseLineStyleBase line
namestyle-properties-textstyle-colorstringColor in CSS form
namestyle-properties-textstyle-fillFillStyleText fill style
namestyle-properties-textstyle-fontstringFont see
namestyle-properties-textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
namestyle-properties-textstyle-lineheightstring | numberLine height
namestyle-properties-textstyle-multilinebooleanAllow multi-line text
namestyle-properties-textstyle-outlinestringOutline style
namestyle-properties-textstyle-outlineLineStyleOutline style
namestyle-properties-textstyle-overflowwrapOverflowWrapStyleOverflow wrap
namestyle-properties-textstyle-strikethroughstringStrikethrough style
namestyle-properties-textstyle-strikethroughLineStyleStrikethrough style
namestyle-properties-textstyle-textoverflowTextOverflowStyleText overflow
namestyle-properties-textstyle-underlinestringUnderline style
namestyle-properties-textstyle-underlineLineStyleUnderline style
namestyle-properties-textstyle-underlineoffsetstring | numberUnderline offset distance
namestyle-properties-textstyle-whitespaceWhiteSpaceStyleWhite space
namestyle-properties-textstyle-wordbreakWordBreakStyleWord break
namestyle-properties-texttransformTransformText-transform (uppercase, lowercase, capitalize)
namestyle-properties-userheightnumberHeight
namestyle-properties-userwidthnumberWidth
namestyle-textstylestringText style of the name text. If provided, overrides font and color
namestyle-textstyleTextStyleText style of the name text. If provided, overrides font and color
namestyle-visiblebooleanVisibility of the name text
opacitynumberNode opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context
opacityblendmodeBlendModeNode opacity mode to blend it
scalescrollstrategyScaleScrollStrategyScale scroll strategy
selectablebooleanSelectable node, a boolean to determine if selection should consider this node
taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
transformstringAdditional CSS transformation applied to node or 'none'
transformTransformationAdditional CSS transformation applied to node or 'none'
unitsstringUnits in which data is represented in this gauge
valuenumberValue of the gauge to set at initiation
valuestyleValueOptionsProperties of the test displaying name of the gauge
valuestyle-alignmentAnchorTypeDefines where in the region the value text will be positioned
valuestyle-colorstringColor of name text
valuestyle-displaystrategyValueDisplayStrategiesA display strategy to define how the value text fits the region it is rendered in
valuestyle-fontstringFont of value text
valuestyle-formatstringFormat of value to set on number formatter
valuestyle-positionRegionsRegion in which to render the name text
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-propertiesOptionsSee
valuestyle-textstylestringText style of the value text. If provided, overrides font and color
valuestyle-textstyleTextStyleText style of the value text. If provided, overrides font and color
valuestyle-visiblebooleanVisibility of the value text
visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
widthnumberWidth of the gauge in its parent model limits
xnumberX coordinate of left top corner of the gauge in its parent model limits
ynumberY coordinate of left top corner of the gauge in its parent model limits
z-indexnumberDefine node z-index

Contents

Constructors

new NumericGauge(options)

new NumericGauge(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

AbstractGauge.constructor

Methods

addAlarm

addAlarm(alarm): NumericGauge

Adds an alarm to the axis. Alarm handler will be called every time value set on the axis falls within alarm's range

Parameters

Name Type Description
alarmAlarm | Alarm[]An alarm to add

Returns

NumericGauge


addCssClass

addCssClass(cssclass): NumericGauge

Adds new css class to node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

NumericGauge

this

Inherited from

AbstractGauge.addCssClass


addCustomComponent

addCustomComponent(component, region, layer): NumericGauge

Adds a custom component to provided specified region. A custom component is a group with any geometry inside. The group bounds will be changed to fit the region it is added to. To maintain the size of your custom group it is better to add a custom region to the gauge.

Parameters

Name Type Description
componentGroup<Node>A group with custom shape(s)
regionstringName of the region to add component to. If such region does not exist nothing will happen and the custom shape will not be added
layerstringname of gauge layer to add component

Returns

NumericGauge

Inherited from

AbstractGauge.addCustomComponent


addInvalidateHandler

addInvalidateHandler(handler): NumericGauge

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

NumericGauge

this

Inherited from

AbstractGauge.addInvalidateHandler


addRegion

addRegion(name, region?): NumericGauge

Adds a new region to the gauge. Region is a rectangular area on the gauge defined by x, y, width and height all set in CSS format.

Throws

When name is not provided to the custom region

Parameters

Name Type Description
namestring | OptionsName of the region or a json with region parameters (including name)
Optional regionOptionsJSON with region parameters

Returns

NumericGauge

Inherited from

AbstractGauge.addRegion


applyOpacity

Protected applyOpacity(context): NumericGauge

This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

NumericGauge

this

Inherited from

AbstractGauge.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

AbstractGauge.applyResponsiveStyle


checkCollision

checkCollision(context): boolean

Check if gauge falls within visible area on the screen

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

true if object is inside of rendarable area

Inherited from

AbstractGauge.checkCollision


cleanAlarms

cleanAlarms(): NumericGauge

Removes all attached alarms

Returns

NumericGauge

this


clone

clone(): Node

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

Node

clone

Inherited from

AbstractGauge.clone


connectStyle

connectStyle(style, type, callback): NumericGauge

Connects style.

This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

NumericGauge

this

Inherited from

AbstractGauge.connectStyle


copyConstructor

Protected copyConstructor(gauge): NumericGauge

Copy constructor function Used to clone gauge

Parameters

Name Type Description
gaugeNumericGaugegauge for cloning

Returns

NumericGauge

Overrides

AbstractGauge.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): NumericGauge

Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.

Parameters

Name Type Description
styleEventDispatcherconnect style
typestringtype of event or property
callbackAttributeCallback<EventDispatcher>function to be called

Returns

NumericGauge

this

Inherited from

AbstractGauge.disconnectStyle


displayRegions

displayRegions(name?): NumericGauge

Debug method to display regions of the gauge in different colors

Parameters

Name Type Description
Optional namestringIf you want to display only one region, pass its name here

Returns

NumericGauge

Inherited from

AbstractGauge.displayRegions


dispose

dispose(): void

Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null.

Returns

void

Inherited from

AbstractGauge.dispose


enableClipping

enableClipping(clipping): NumericGauge

Sets innergroup clipping

Parameters

Name Type Description
clippingbooleanclipping

Returns

NumericGauge

Inherited from

AbstractGauge.enableClipping


enableEventPropagation

enableEventPropagation(enable): NumericGauge

Enable event propagation from the node hierarchy from bottom to top

This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.

Example

import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');

parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();

Parameters

Name Type Description
enablebooleanenable

Returns

NumericGauge

this

Inherited from

AbstractGauge.enableEventPropagation


enumerateNodes

enumerateNodes(callback, target?): void

Enumerate children nodes

Parameters

Name Type Description
callbackCallback<Node | CustomComponent | Alarm>callback
Optional targetQueryBuilder<any>target

Returns

void

Inherited from

AbstractGauge.enumerateNodes


execute

execute(delegate): NumericGauge

Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.

Example

// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});

group.getLineStyle().setPattern('pattern');
return group;

// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});

Parameters

Name Type Description
delegate(this: NumericGauge) => voidFunction to execute

Returns

NumericGauge

The result if any or this

Inherited from

AbstractGauge.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: NumericGauge) => T

Returns

T

Inherited from

AbstractGauge.execute


filter

Protected filter(context): boolean

Filter node

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

flag filter flag ("true" to render node; "false" otherwise)

Inherited from

AbstractGauge.filter


getAlarm

getAlarm(name): Alarm

Gets the alarm referenced by provided name or index. If alarm name is not set or no such index exists, null will be returned.

Parameters

Name Type Description
namestring | numberName of alarm or its index in iterator

Returns

Alarm


getAlarms

getAlarms(filter?): Iterator<Alarm>

Gets an iterator over existing alarms in the gauge

Parameters

Name Type Description
Optional filter(item: Alarm) => booleana filter function. Returns all axes if not provided

Returns

Iterator<Alarm>


getAnimation

getAnimation(): string

Returns the name of animation function associated with this gauge

Returns

string


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

AbstractGauge.getAnimationStyle


getAnimationTime

getAnimationTime(): number

Returns time in which a full animation cycle is finished (in seconds)

Returns

number


getBackgroundStyle

getBackgroundStyle(): BackgroundStyleOptionsOut

Returns background styles

Returns

BackgroundStyleOptionsOut


getBounds

getBounds(): Rect

Returns current bounds of the gauge

Returns

Rect

Inherited from

AbstractGauge.getBounds


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractGauge.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

AbstractGauge.getClipStyle


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

AbstractGauge.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

AbstractGauge.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

AbstractGauge.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

AbstractGauge.getCssTransform


getCustomComponent

getCustomComponent(index): Group<Node>

Returns a registered custom component by its index

Parameters

Name Type Description
indexstring | numberIndex or name of the component to return

Returns

Group<Node>

Null if no such index exists

Inherited from

AbstractGauge.getCustomComponent


getCustomComponents

getCustomComponents(filter?): Iterator<Group<Node>>

Return iterator on registered custom components

Parameters

Name Type Description
Optional filter(item: Group<Node>) => booleana filter function. Returns all nodes if null

Returns

Iterator<Group<Node>>

Inherited from

AbstractGauge.getCustomComponents


getFunctionRegistry

getFunctionRegistry(): FunctionRegistry

Returns function registry which provides handlers for gauges animation and alarms

Returns

FunctionRegistry

registry New registry to set

Inherited from

AbstractGauge.getFunctionRegistry


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

AbstractGauge.getId


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

AbstractGauge.getInvalidateMethod


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

Returns the current layout of the gauge

Returns

LayoutStyle<string | number>

Inherited from

AbstractGauge.getLayoutStyle


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

AbstractGauge.getLocalTransform


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

AbstractGauge.getMarginsStyle


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

AbstractGauge.getName


getNameProperties

getNameProperties(): NameOptionsOut

Gets properties of value text

Returns

NameOptionsOut


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

AbstractGauge.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

AbstractGauge.getOpacityBlendMode


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

AbstractGauge.getParent


getProperties

getProperties(): OptionsOut

Returns an object with all the properties pertaining to this gauge.

Returns

OptionsOut

properties

Overrides

AbstractGauge.getProperties


getProperty

getProperty(name): any

Gets dynamic property by name. These properties can be used as a property bags

Parameters

Name Type Description
namestringproperty name

Returns

any

Inherited from

AbstractGauge.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

AbstractGauge.getPropertyKeys


getRegion

getRegion(name): Region

Returns the region registered with provided name.

Parameters

Name Type Description
namestringName of the region to return

Returns

Region

Inherited from

AbstractGauge.getRegion


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

AbstractGauge.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

AbstractGauge.getResponsiveStyle


getRoot

getRoot(): Node

Returns root node.
If node doesn't have parent then it returns itself.

Returns

Node

the root node

Inherited from

AbstractGauge.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

AbstractGauge.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

AbstractGauge.getSceneTransform


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

AbstractGauge.getTag


getValue

getValue(): number

Returns the current value of the axis

Returns

number


getValueProperties

getValueProperties(): ValueOptionsOut

Gets properties of value text

Returns

ValueOptionsOut

Format of value to set on number formatter


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

AbstractGauge.getVisible


getWorldTransform

getWorldTransform(): Transformation

Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.

Returns

Transformation

transform the world transform.

Inherited from

AbstractGauge.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

AbstractGauge.getZIndex


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

AbstractGauge.hasCssClass


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

AbstractGauge.hasEventListener


hideRegions

hideRegions(): NumericGauge

Hides the regions displayed for debug reasons

Returns

NumericGauge

Inherited from

AbstractGauge.hideRegions


invalidate

invalidate(bounds?, force?): NumericGauge

Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.

Parameters

Name Type Description
Optional boundsRectbounds of the invalid rectangle in the inner node coordinates
Optional forcebooleantrue if parent should be invalidated immediately if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed

Returns

NumericGauge

this

Inherited from

AbstractGauge.invalidate


invalidateParent

Protected invalidateParent(bounds?, force?): NumericGauge

Invalidate parent and notify all listeners. NOTE: Don't keep arguments of the event, because instance can be changed

Fires

Events.Invalidate

Parameters

Name Type Description
Optional boundsRectbounds of the invalid rectangle in the inner node coordinates
Optional forcebooleanforce rendering

Returns

NumericGauge

this

Inherited from

AbstractGauge.invalidateParent


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AbstractGauge.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

AbstractGauge.isEventPropagationEnabled


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

AbstractGauge.isNotificationEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

AbstractGauge.isSelectable


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

AbstractGauge.isSilent


notify

notify<E>(type, source, args?): NumericGauge

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event
sourceNumericGaugesource who called the event
Optional argsEventMap[E]event arguments

Returns

NumericGauge

this

Overrides

AbstractGauge.notify


off

off<E>(type?, callback?): NumericGauge

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: NumericGauge, args: EventMap[E]) => voidfunction to be called

Returns

NumericGauge

this

Overrides

AbstractGauge.off


on

on<E>(type, callback): NumericGauge

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: NumericGauge, args: EventMap[E]) => voidto be called

Returns

NumericGauge

this

Overrides

AbstractGauge.on


onParentChanged

Protected onParentChanged(node): NumericGauge

This method is called when parent changes. Do not call it directly.

Parameters

Name Type Description
nodeNodenode to change parent

Returns

NumericGauge

this

Inherited from

AbstractGauge.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

This method is called if visibility is changed. Send event Events.VisibilityChanged

Returns

void

Inherited from

AbstractGauge.onVisibilityChanged


postRendering

Protected postRendering(context): void

To be called after rendering. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

AbstractGauge.postRendering


preRendering

Protected preRendering(context): void

Occurs before rendering this method sets clipping by default. Call this method if you override method render

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

AbstractGauge.preRendering


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AbstractGauge.registerAnimationStyle


removeAlarm

removeAlarm(name): NumericGauge

Removes an alarm by its name, index, or instance of alarm. The alarm will never be called again and reference to it will be removed. Does nothing if no such alarm has been added before

Parameters

Name Type Description
namestring | number | AlarmName of alarm or its index in iterator

Returns

NumericGauge

this


removeCssClass

removeCssClass(cssclass): NumericGauge

Removes css class from node

Parameters

Name Type Description
cssclassstring | string[]css class name('s)

Returns

NumericGauge

this

Inherited from

AbstractGauge.removeCssClass


removeCustomComponent

removeCustomComponent(component): NumericGauge

Removes a registered custom component from the gauge. If such component was not registered, does nothing.

Parameters

Name Type Description
componentnumber | Group<Node>The component which has to be deleted, or its index in iterator.

Returns

NumericGauge

Inherited from

AbstractGauge.removeCustomComponent


removeInvalidateHandler

removeInvalidateHandler(handler): NumericGauge

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

NumericGauge

this

Inherited from

AbstractGauge.removeInvalidateHandler


removeRegion

removeRegion(name): NumericGauge

Deletes a region from the layout. Only custom added regions can be removed. Will do nothing if no such region was registered

Parameters

Name Type Description
namestringName of the region

Returns

NumericGauge

Inherited from

AbstractGauge.removeRegion


render

render(context): NumericGauge

Renders node

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node

Returns

NumericGauge

Inherited from

AbstractGauge.render


renderAsync

renderAsync(context, callback): void

Render node in asynchronous mode. Default implementation creates call method "render" inside

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node
callback() => voidcallback function

Returns

void

Inherited from

AbstractGauge.renderAsync


rotate

rotate(theta, x, y): NumericGauge

Rotate bounds around a given coordinate

Parameters

Name Type Description
thetanumberangle to rotate node, in radians
xnumberx coordinate to rotate around
ynumbery coordinate to rotate around

Returns

NumericGauge

this

Inherited from

AbstractGauge.rotate


scale

scale(xx, yy): NumericGauge

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

NumericGauge

this

Inherited from

AbstractGauge.scale


setAnimation

setAnimation(name): NumericGauge

Sets the name of animation function in function registry corresponding to this axis

Parameters

Name Type Description
namestringName of the function. This function has to be registered in the registry, otherwise no animation will be applied.

Returns

NumericGauge


setAnimationStyle

setAnimationStyle(animationStyle): NumericGauge

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

NumericGauge

Inherited from

AbstractGauge.setAnimationStyle


setAnimationTime

setAnimationTime(time): NumericGauge

Sets time required to accomplish a full animation run in between two values (in seconds)

Parameters

Name Type Description
timenumberTime in seconds to perform the animation

Returns

NumericGauge

this


setBackgroundStyle

setBackgroundStyle(props): NumericGauge

Sets background styles

Parameters

Name Type Description
propsBackgroundStyleOptionsobject containing background styles

Returns

NumericGauge


setBounds

setBounds(bounds): NumericGauge

Sets bounds to the gauge

Parameters

Name Type Description
boundsRectNew bounds

Returns

NumericGauge

Inherited from

AbstractGauge.setBounds


setClipStyle

setClipStyle(style): NumericGauge

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

NumericGauge

this

Inherited from

AbstractGauge.setClipStyle


setCss

setCss(style, merge?): NumericGauge

Sets CSS style. This style will be applied for all inserted elements

Parameters

Name Type Description
styleTypeCSS style to be applied to inserted elements
Optional mergebooleanmerge flag

Returns

NumericGauge

this

Inherited from

AbstractGauge.setCss


setCssClass

setCssClass(name): NumericGauge

Sets css class name of the node to be used to apply CSS style

Parameters

Name Type Description
namestringcss class name of the node

Returns

NumericGauge

this

Inherited from

AbstractGauge.setCssClass


setCssTransform

setCssTransform(transform): NumericGauge

Set CSS transformation

Parameters

Name Type Description
transformstring | Transformationtransformation css transformation instruction or Transformation instance

Returns

NumericGauge

this

Inherited from

AbstractGauge.setCssTransform


setFunctionRegistry

setFunctionRegistry(registry): NumericGauge

Sets function registry which will provide handlers for gauges animation and alarms

Parameters

Name Type Description
registryFunctionRegistryNew registry to set

Returns

NumericGauge

Inherited from

AbstractGauge.setFunctionRegistry


setId

setId(id): NumericGauge

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

NumericGauge

this

Inherited from

AbstractGauge.setId


setLayoutStyle

setLayoutStyle(layoutStyle, merge?): NumericGauge

Specify desired layout style

Parameters

Name Type Description
layoutStyleLayoutStyle<string | number> | Options<string | number>desired layout style
Optional mergebooleantrue if you want to merge layoutStyle with existing attribute, false by default

Returns

NumericGauge

Inherited from

AbstractGauge.setLayoutStyle


setLocalTransform

setLocalTransform(localTransform): NumericGauge

Sets local transformation to be used to transform from local to parent coordinate

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node

Returns

NumericGauge

Inherited from

AbstractGauge.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): NumericGauge

Sets margins style

Parameters

Name Type Description
marginsType<string | number>margins style
Optional mergebooleantrue if you want to merge marginsStyle with existing attribute, false by default

Returns

NumericGauge

this

Inherited from

AbstractGauge.setMarginsStyle


setName

setName(name): NumericGauge

Sets the name of the gauge

Parameters

Name Type Description
namestringThe new gauge name

Returns

NumericGauge

Overrides

AbstractGauge.setName


setNameProperties

setNameProperties(props): NumericGauge

Sets properties pertaining to text representing gauge name

Parameters

Name Type Description
propsNameOptionsObject with properties

Returns

NumericGauge


setNotification

setNotification(notify, force?): NumericGauge

set notification state

Parameters

Name Type Description
notifybooleanflag set to invalidate parent or not
Optional forcebooleantrue if parent should be invalidated immediately

Returns

NumericGauge

this

Inherited from

AbstractGauge.setNotification


setOpacity

setOpacity(opacity, blendMode?): NumericGauge

Sets node opacity

Parameters

Name Type Description
opacitynumbernode opacity from 0 to 1
Optional blendModeBlendModeopacity blend mode. If it is normal, opacity will be replaced.

Returns

NumericGauge

this

Inherited from

AbstractGauge.setOpacity


setProperties

setProperties(props?): NumericGauge

Sets properties pertaining to this gauge.

Parameters

Name Type Description
Optional propsOptionsproperties

Returns

NumericGauge

Overrides

AbstractGauge.setProperties


setProperty

setProperty(name, value): NumericGauge

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

NumericGauge

this

Inherited from

AbstractGauge.setProperty


setRegionSize

setRegionSize(regionType, size): NumericGauge

For North, South sides sets height, for East and West sets width, for custom regions sets x, y, width and height

Parameters

Name Type Description
regionTypestringName of the region
sizestring | number | RegionWidth or height of a side in CSS format, or an object with properties for custom regions

Returns

NumericGauge

Inherited from

AbstractGauge.setRegionSize


setRenderingFilter

setRenderingFilter(filter): NumericGauge

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

NumericGauge

this

Inherited from

AbstractGauge.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): NumericGauge

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

NumericGauge

this

Inherited from

AbstractGauge.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): NumericGauge

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

NumericGauge

this

Inherited from

AbstractGauge.setScaleScrollStrategy


setSelectable

setSelectable(selectable): NumericGauge

Allows to select node. If node is not selectable then child node is not selectable.

Parameters

Name Type Description
selectablebooleanflag to allow node selection

Returns

NumericGauge

this

Inherited from

AbstractGauge.setSelectable


setSilent

setSilent(bool): NumericGauge

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

NumericGauge

this

Inherited from

AbstractGauge.setSilent


setTag

setTag(tag): NumericGauge

Allows the user to associate any arbitrary object with the node.

Parameters

Name Type Description
taganyThe object to be associated with the node.

Returns

NumericGauge

this

Inherited from

AbstractGauge.setTag


setValue

setValue(val, skipAnimation?): NumericGauge

Sets the value of the gauge.

Parameters

Name Type Description
valnumberNew value to set
Optional skipAnimationbooleanIf true, value change will not be animated

Returns

NumericGauge


setValueProperties

setValueProperties(props): NumericGauge

Sets properties pertaining to text representing gauge value

Parameters

Name Type Description
propsValueOptionsObject with properties

Returns

NumericGauge


setVisible

setVisible(value): NumericGauge

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

NumericGauge

this

Inherited from

AbstractGauge.setVisible


setZIndex

setZIndex(value): NumericGauge

Sets z-index for node (set null for default)

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

NumericGauge

this

Inherited from

AbstractGauge.setZIndex


shear

shear(shx, shy): NumericGauge

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

NumericGauge

this

Inherited from

AbstractGauge.shear


toString

toString(): string

Returns a string representation of this object (generally the classname)

Returns

string

A string representation

Inherited from

AbstractGauge.toString


translate

translate(tx, ty): NumericGauge

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

NumericGauge

this

Inherited from

AbstractGauge.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AbstractGauge.unregisterAnimationStyle


updateSceneTransformation

updateSceneTransformation(): NumericGauge

Update scene transformation

Returns

NumericGauge

this

Inherited from

AbstractGauge.updateSceneTransformation


updateState

updateState(regions?, changes?): NumericGauge

Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph

Parameters

Name Type Description
Optional regionsRect[]optional array to return invalid rectangles in the parent coordinates
Optional changesStateChangesoptional parameter to specify a reason of changes

Returns

NumericGauge

this

Inherited from

AbstractGauge.updateState


updateTimeStamp

Protected updateTimeStamp(): NumericGauge

Update time stamp to indicate that Node or Children has been changed.

Returns

NumericGauge

this

Inherited from

AbstractGauge.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

AbstractGauge.enableSceneGraphNotification


findParent

Static findParent<T>(node, classType, filter?): InstanceType<T>

Find root of the node with specified type

Type parameters

NameType
Textends Constructor<any>

Parameters

Name Type Description
nodeNodenode to start search
classTypeTtype of the class to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

InstanceType<T>

Inherited from

AbstractGauge.findParent

Static findParent(node, classType, filter?): Node

Find root of the node with specified type

Parameters

Name Type Description
nodeNodenode to start search
classTypestringinterface name to search for
Optional filter(node: Node) => booleanadditional filter to apply

Returns

Node

Inherited from

AbstractGauge.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractGauge.getClassName


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

AbstractGauge.isSceneGraphNotificationEnabled