Last updated

API / geotoolkit / gauges / AxisGauge / AxisGauge

Class: AxisGauge

gauges.AxisGauge.AxisGauge

Defines a class which implements a gauge displaying data represented by axes. Each axis represents one specific data set with lower and upper limit. Every normal operation, like setting value, function registry, animation, e.t.c, are performed on the axes as opposed to gauge like it is done in the numeric gauges. In this case the gauge works as a container of the axes and is only capable of axis manipulations and abstract gauge functionality.

Hierarchy

Table of contents

Constructors
Methods
addAxisaddCssClassaddCustomComponent
addInvalidateHandleraddRegionapplyOpacity
applyResponsiveStylecheckCollisionclearAxes
cloneconnectStylecopyConstructor
disconnectStyledisplayRegionsdispose
enableClippingenableEventPropagationenumerateNodes
executefiltergetAnimationStyle
getAxesgetAxisgetBounds
getClassNamegetClipStylegetCss
getCssClassgetCssClassesgetCssTransform
getCustomComponentgetCustomComponentsgetFunctionRegistry
getIdgetInvalidateMethodgetLayoutStyle
getLocalTransformgetMarginsStylegetName
getOpacitygetOpacityBlendModegetParent
getPropertiesgetPropertygetPropertyKeys
getRegiongetRenderingFiltergetResponsiveStyle
getRootgetScaleScrollStrategygetSceneTransform
getTaggetVisiblegetWorldTransform
getZIndexhasAxishasCssClass
hasEventListenerhideRegionsinvalidate
invalidateParentisDisposedisEventPropagationEnabled
isNotificationEnabledisSelectableisSilent
notifyoffon
onParentChangedonVisibilityChangedpostRendering
preRenderingreassignAxisNameregisterAnimationStyle
removeAxisremoveCssClassremoveCustomComponent
removeInvalidateHandlerremoveRegionrender
renderAsyncrotatescale
setAnimationStylesetBoundssetClipStyle
setCsssetCssClasssetCssTransform
setFunctionRegistrysetIdsetLayoutStyle
setLocalTransformsetMarginsStylesetName
setNotificationsetOpacitysetProperties
setPropertysetRangesetRegionSize
setRenderingFiltersetResponsiveStylesetScaleScrollStrategy
setSelectablesetSilentsetTag
setValuesetVisiblesetZIndex
sheartoStringtranslate
unregisterAnimationStyleupdateSceneTransformationupdateState
updateTimeStampenableSceneGraphNotificationfindParent
getClassNameisSceneGraphNotificationEnabled
Css Properties
Name Type Description
axesAxisJSON with axes properties where the key is the axis name and the property is an object with axis properties. If no axis with such name has been registered, a new axis with the properties will be added
axes-alarmsAlarmAlarm to add, an array of such alarms, or object (array of objects) to be passed into the alarm
axes-alarms-handlernamestringName of the handler function as defined in Alarm Factory
axes-alarms-highnumberUpper boundary of range that the alarm is effective on
axes-alarms-lownumberLower boundary of range that the alarm is effective on
axes-alarms-namestringName of the alarm for indexing
axes-alarms-rangeRangeRange that the alarm is effective on
axes-alarms-range-highnumberUpper range boundary
axes-alarms-range-lownumberLower range boundary
axes-alarms-range-maxnumber
axes-alarms-range-minnumber
axes-animationfunctionFunctionsName of animation function
axes-animationtimenumberAnimation time
axes-clipstyleClipStyleClipping style
axes-clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
axes-clipstyle-geometryGraphicsPathClipping geometry
axes-clipstyle-geometry-boundsRectBounds
axes-clipstyle-geometry-bounds-heightnumberHeight
axes-clipstyle-geometry-bounds-readonlybooleanReadonly
axes-clipstyle-geometry-bounds-widthnumberWidth
axes-clipstyle-geometry-bounds-xnumberLeft
axes-clipstyle-geometry-bounds-ynumberTop
axes-clipstyleGraphicsPathClipping style
axes-cssclassstringThe css class name of this node
axes-csscursorstringCSS cursor associated with node
axes-cssstylestringCSS style to be applied to inserted elements
axes-idstring | numberId of the node, its a unique identifier
axes-linestylestringLine style for main region
axes-linestyleLineStyleLine style for main region
axes-linestyle-colorstringColor in CSS form
axes-linestyle-fillstringOptional fill style to be used to fill lines generated with this style
axes-linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
axes-linestyle-fill-colorstringColor in CSS form
axes-linestyle-fill-evenoddmodebooleanEven-odd fill mode
axes-linestyle-fill-fillpatternPatternPattern
axes-linestyle-fill-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
axes-linestyle-fill-fillpattern-patternnamestringName of this pattern for indexing
axes-linestyle-fill-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
axes-linestyle-fill-foregroundstringForeground color
axes-linestyle-fill-patternPatternPattern
axes-linestyle-linecapCapStyleThe line cap style
axes-linestyle-linedashoffsetnumberLine dash offset of dashed line
axes-linestyle-linejoinJoinStyleThe line join style
axes-linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
axes-linestyle-scalablebooleanTrue if width should depend on transformation
axes-linestyle-unitstringOptional unit for the width
axes-linestyle-widthnumber | stringThe line thickness
axes-localtransformTransformationLocal transformation
axes-localtransform-dxnumberX axis translation
axes-localtransform-dynumberY axis translation
axes-localtransform-xxnumberX scale
axes-localtransform-xynumberXy skew
axes-localtransform-yxnumberYx skew
axes-localtransform-yynumberY scale
axes-marginsnumber | stringIt has properties for specifying the margins for each side
axes-namestringName of the node. It is often used for debugging purposes or to simplify queries
axes-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
axes-opacityblendmodeBlendModeNode opacity mode to blend it
axes-rangeRangeRange see
axes-scalescrollstrategyScaleScrollStrategyScale scroll strategy
axes-scalescrollstrategy-enabledbooleanEnable flag
axes-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
axes-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
axes-tickgeneratorTickGeneratorThe tick generator for the axis
axes-tickgenerator-labelstylesTextStyleAn object containing label style for specified grades
axes-tickgenerator-labelstyles-alignmentAlignmentStyleAlignment
axes-tickgenerator-labelstyles-autosizebooleanAuto font size on high definition display
axes-tickgenerator-labelstyles-backgroundstringBackground style
axes-tickgenerator-labelstyles-backgroundFillStyleBackground style
axes-tickgenerator-labelstyles-baselineBaseLineStyleBase line
axes-tickgenerator-labelstyles-colorstringColor in CSS form
axes-tickgenerator-labelstyles-fillFillStyleText fill style
axes-tickgenerator-labelstyles-fontstringFont see
axes-tickgenerator-labelstyles-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
axes-tickgenerator-labelstyles-lineheightstring | numberLine height
axes-tickgenerator-labelstyles-multilinebooleanAllow multi-line text
axes-tickgenerator-labelstyles-outlinestringOutline style
axes-tickgenerator-labelstyles-outlineLineStyleOutline style
axes-tickgenerator-labelstyles-overflowwrapOverflowWrapStyleOverflow wrap
axes-tickgenerator-labelstyles-strikethroughstringStrikethrough style
axes-tickgenerator-labelstyles-strikethroughLineStyleStrikethrough style
axes-tickgenerator-labelstyles-textoverflowTextOverflowStyleText overflow
axes-tickgenerator-labelstyles-underlinestringUnderline style
axes-tickgenerator-labelstyles-underlineLineStyleUnderline style
axes-tickgenerator-labelstyles-underlineoffsetstring | numberUnderline offset distance
axes-tickgenerator-labelstyles-whitespaceWhiteSpaceStyleWhite space
axes-tickgenerator-labelstyles-wordbreakWordBreakStyleWord break
axes-tickgenerator-taganyTag user can specify info associated with current object
axes-tickgenerator-tickstylesLineStyleAn object containing tick styles for specified grades
axes-transformstringAdditional CSS transformation applied to node or 'none'
axes-transformTransformationAdditional CSS transformation applied to node or 'none'
axes-unitsstringUnits to append to the end
axes-valuenumberValue of the axis
axes-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
axes-z-indexnumberDefine node z-index
boundsRectBounds of the gauge in parent model limits. Will override x,y,widht,height
clippingbooleanContainer group clipping
clipstyleClipStyleClipping style
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
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
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'
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 AxisGauge(options)

Protected new AxisGauge(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

AbstractGauge.constructor

Methods

addAxis

Abstract addAxis(params): Axis

Adds a new axis to the axis gauge.

Parameters

Name Type Description
paramsAxis | OptionsParameters required to create an axis

Returns

Axis


addCssClass

addCssClass(cssclass): AxisGauge

Adds new css class to node

Parameters

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

Returns

AxisGauge

this

Inherited from

AbstractGauge.addCssClass


addCustomComponent

addCustomComponent(component, region, layer): AxisGauge

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

AxisGauge

Inherited from

AbstractGauge.addCustomComponent


addInvalidateHandler

addInvalidateHandler(handler): AxisGauge

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

AxisGauge

this

Inherited from

AbstractGauge.addInvalidateHandler


addRegion

addRegion(name, region?): AxisGauge

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

AxisGauge

Inherited from

AbstractGauge.addRegion


applyOpacity

Protected applyOpacity(context): AxisGauge

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

AxisGauge

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


clearAxes

clearAxes(): void

Clears gauge axes

Returns

void


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): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.connectStyle


copyConstructor

Protected copyConstructor(gauge): AxisGauge

Copy constructor function Used to clone gauge

Parameters

Name Type Description
gaugeAxisGaugesource gauge

Returns

AxisGauge

Overrides

AbstractGauge.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.disconnectStyle


displayRegions

displayRegions(name?): AxisGauge

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

AxisGauge

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): AxisGauge

Sets innergroup clipping

Parameters

Name Type Description
clippingbooleanclipping

Returns

AxisGauge

Inherited from

AbstractGauge.enableClipping


enableEventPropagation

enableEventPropagation(enable): AxisGauge

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

AxisGauge

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): AxisGauge

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: AxisGauge) => voidFunction to execute

Returns

AxisGauge

The result if any or this

Inherited from

AbstractGauge.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: AxisGauge) => 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


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

AbstractGauge.getAnimationStyle


getAxes

getAxes(filter?): Iterator<Axis>

Returns an iterator over existing axes in this gauge

Parameters

Name Type Description
Optional filter(item: Axis) => booleana filter function. Returns all axes if null

Returns

Iterator<Axis>


getAxis

getAxis(name): Axis

Gets an axis by its name or index from axes iterator

Parameters

Name Type Description
namestring | numberName of the axis or its index

Returns

Axis


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


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

Gets 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


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


hasAxis

hasAxis(axis): boolean

Checks if the gauge contains specified axis

Parameters

Name Type Description
axisstring | AxisThe axis or its name

Returns

boolean


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(): AxisGauge

Hides the regions displayed for debug reasons

Returns

AxisGauge

Inherited from

AbstractGauge.hideRegions


invalidate

invalidate(bounds?, force?): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.invalidate


invalidateParent

Protected invalidateParent(bounds?, force?): AxisGauge

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

AxisGauge

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>(event, source, args?): AxisGauge

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

Name Type Description
eventEtype of event
sourceAbstractNodesource who called the event
Optional argsEventMap[E]event arguments

Returns

AxisGauge

this

Inherited from

AbstractGauge.notify


off

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

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: AxisGauge, args: EventMap<Node>[E]) => voidfunction to be called

Returns

AxisGauge

this

Inherited from

AbstractGauge.off


on

on<E>(type, callback): AxisGauge

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: AxisGauge, args: EventMap<Node>[E]) => voidto be called

Returns

AxisGauge

this

Inherited from

AbstractGauge.on


onParentChanged

Protected onParentChanged(node): AxisGauge

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

Parameters

Name Type Description
nodeNodenode to change parent

Returns

AxisGauge

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


reassignAxisName

reassignAxisName(oldName, newName): AxisGauge

Changes the name of axis in the map without needing to remove and readd the axis

Parameters

Name Type Description
oldNamestringOld name of the axis
newNamestringNew name of the axis

Returns

AxisGauge


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AbstractGauge.registerAnimationStyle


removeAxis

removeAxis(name): AxisGauge

Removes an axis from the gauge. If no such axis exists, nothing will be done.

Parameters

Name Type Description
namestring | numberName of the axis or its index

Returns

AxisGauge


removeCssClass

removeCssClass(cssclass): AxisGauge

Removes css class from node

Parameters

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

Returns

AxisGauge

this

Inherited from

AbstractGauge.removeCssClass


removeCustomComponent

removeCustomComponent(component): AxisGauge

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

AxisGauge

Inherited from

AbstractGauge.removeCustomComponent


removeInvalidateHandler

removeInvalidateHandler(handler): AxisGauge

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

AxisGauge

this

Inherited from

AbstractGauge.removeInvalidateHandler


removeRegion

removeRegion(name): AxisGauge

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

AxisGauge

Inherited from

AbstractGauge.removeRegion


render

render(context): AxisGauge

Renders node

Parameters

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

Returns

AxisGauge

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): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.rotate


scale

scale(xx, yy): AxisGauge

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

AxisGauge

this

Inherited from

AbstractGauge.scale


setAnimationStyle

setAnimationStyle(animationStyle): AxisGauge

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

AxisGauge

Inherited from

AbstractGauge.setAnimationStyle


setBounds

setBounds(bounds): AxisGauge

Sets bounds to the gauge

Parameters

Name Type Description
boundsRectNew bounds

Returns

AxisGauge

Inherited from

AbstractGauge.setBounds


setClipStyle

setClipStyle(style): AxisGauge

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

AxisGauge

this

Inherited from

AbstractGauge.setClipStyle


setCss

setCss(style, merge?): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.setCss


setCssClass

setCssClass(name): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.setCssClass


setCssTransform

setCssTransform(transform): AxisGauge

Set CSS transformation

Parameters

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

Returns

AxisGauge

this

Inherited from

AbstractGauge.setCssTransform


setFunctionRegistry

setFunctionRegistry(registry): AxisGauge

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

Parameters

Name Type Description
registryFunctionRegistryNew registry to set

Returns

AxisGauge

Inherited from

AbstractGauge.setFunctionRegistry


setId

setId(id): AxisGauge

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

AxisGauge

this

Inherited from

AbstractGauge.setId


setLayoutStyle

setLayoutStyle(layoutStyle, merge?): AxisGauge

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

AxisGauge

Inherited from

AbstractGauge.setLayoutStyle


setLocalTransform

setLocalTransform(localTransform): AxisGauge

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

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node

Returns

AxisGauge

Inherited from

AbstractGauge.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.setMarginsStyle


setName

setName(name): AxisGauge

Sets name of the node

Parameters

Name Type Description
namestringThe node name

Returns

AxisGauge

this

Inherited from

AbstractGauge.setName


setNotification

setNotification(notify, force?): AxisGauge

set notification state

Parameters

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

Returns

AxisGauge

this

Inherited from

AbstractGauge.setNotification


setOpacity

setOpacity(opacity, blendMode?): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.setOpacity


setProperties

setProperties(props?): AxisGauge

Sets properties pertaining to this gauge.

Parameters

Name Type Description
Optional propsOptionsProperties to set

Returns

AxisGauge

Overrides

AbstractGauge.setProperties


setProperty

setProperty(name, value): AxisGauge

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

AxisGauge

this

Inherited from

AbstractGauge.setProperty


setRange

setRange(range): AxisGauge

If this method is called on the gauge instead of an axis, the value and skipAnimation will be propagated to each axis registered for the gauge. Equivalent to looping through each axis and setting this value. Sets a new data range displayed by this axis

Parameters

Name Type Description
rangeRangeOptionsNew range to set

Returns

AxisGauge


setRegionSize

setRegionSize(regionType, size): AxisGauge

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

AxisGauge

Inherited from

AbstractGauge.setRegionSize


setRenderingFilter

setRenderingFilter(filter): AxisGauge

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

AxisGauge

this

Inherited from

AbstractGauge.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): AxisGauge

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

AxisGauge

this

Inherited from

AbstractGauge.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): AxisGauge

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

AxisGauge

this

Inherited from

AbstractGauge.setScaleScrollStrategy


setSelectable

setSelectable(selectable): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.setSelectable


setSilent

setSilent(bool): AxisGauge

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

AxisGauge

this

Inherited from

AbstractGauge.setSilent


setTag

setTag(tag): AxisGauge

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

Parameters

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

Returns

AxisGauge

this

Inherited from

AbstractGauge.setTag


setValue

setValue(val, skipAnimation?): AxisGauge

If this method is called on the gauge instead of an axis, the value and skipAnimation will be propagated to each axis registered for the gauge. Equivalent to looping through each axis and setting this value.

Parameters

Name Type Description
valnumberNew value for each axis
Optional skipAnimationbooleanTrue to not animate

Returns

AxisGauge


setVisible

setVisible(value): AxisGauge

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

AxisGauge

this

Inherited from

AbstractGauge.setVisible


setZIndex

setZIndex(value): AxisGauge

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

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

AxisGauge

this

Inherited from

AbstractGauge.setZIndex


shear

shear(shx, shy): AxisGauge

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

AxisGauge

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): AxisGauge

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

AxisGauge

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(): AxisGauge

Update scene transformation

Returns

AxisGauge

this

Inherited from

AbstractGauge.updateSceneTransformation


updateState

updateState(regions?, changes?): AxisGauge

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

AxisGauge

this

Inherited from

AbstractGauge.updateState


updateTimeStamp

Protected updateTimeStamp(): AxisGauge

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

Returns

AxisGauge

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