Last updated

API / geotoolkit / gauges / CircularGauge / CircularGauge

Class: CircularGauge

gauges.CircularGauge.CircularGauge

This class implements a full Circular Gauge with possibility of multiple arrows.
A Circular Gauge is a visual representation of a measuring device with a radial axis that sweeps any angle from 0 to 360 degrees and a pointer (Needle or arrow) that indicates values on that scale.
Gauges value is basically an angle on a circle plot. Gauges can have radius and start and end angle. Gauge axes are usually colored for easy value distinction.

Hierarchy

Table of contents

Constructors
Methods
addAxisaddCssClassaddCustomComponent
addInvalidateHandleraddRegionapplyOpacity
applyResponsiveStylecheckCollisionclearAxes
cloneconnectStylecopyConstructor
disconnectStyledisplayRegionsdispose
enableClippingenableEventPropagationenumerateNodes
executefiltergetAnimationStyle
getAxesgetAxisgetBounds
getClassNamegetClipStylegetCss
getCssClassgetCssClassesgetCssTransform
getCustomComponentgetCustomComponentsgetFunctionRegistry
getIdgetInvalidateMethodgetLayoutStyle
getLocalTransformgetMarginsStylegetName
getOpacitygetOpacityBlendModegetPaddingStyle
getParentgetPropertiesgetProperty
getPropertyKeysgetRegiongetRenderingFilter
getResponsiveStylegetRootgetScaleScrollStrategy
getSceneTransformgetTaggetVisible
getWorldTransformgetZIndexhasAxis
hasCssClasshasEventListenerhideRegions
invalidateinvalidateParentisDisposed
isEventPropagationEnabledisNotificationEnabledisSelectable
isSilentnotifyoff
ononParentChangedonVisibilityChanged
postRenderingpreRenderingreassignAxisName
registerAnimationStyleremoveAxisremoveCssClass
removeCustomComponentremoveInvalidateHandlerremoveRegion
renderrenderAsyncrotate
scalesetAnimationStylesetBounds
setClipStylesetCsssetCssClass
setCssTransformsetFunctionRegistrysetId
setLayoutStylesetLocalTransformsetMarginsStyle
setNamesetNotificationsetOpacity
setPaddingStylesetPropertiessetProperty
setRangesetRegionSizesetRenderingFilter
setResponsiveStylesetScaleScrollStrategysetSelectable
setSilentsetStartAnglesetSweepAngle
setTagsetValuesetVisible
setZIndexsheartoString
translateunregisterAnimationStyleupdate
updateSceneTransformationupdateStateupdateTimeStamp
enableSceneGraphNotificationfindParentgetClassName
isSceneGraphNotificationEnabled
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
startanglenumberStart of the gauge body in radians
sweepanglenumberSweep of the gauge body in radians
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 CircularGauge(options)

new CircularGauge(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

AxisGauge.constructor

Methods

addAxis

addAxis(params): CircularAxis

Adds a new circular axis to the gauge. An axis can have only one needle. In order to add more needles to a gauge user needs to add a new axis with its own ranges and data.

Parameters

Name Type Description
paramsCircularAxis | OptionsParameters required to create an axis

Returns

CircularAxis

Overrides

AxisGauge.addAxis


addCssClass

addCssClass(cssclass): CircularGauge

Adds new css class to node

Parameters

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

Returns

CircularGauge

this

Inherited from

AxisGauge.addCssClass


addCustomComponent

addCustomComponent(component, region, layer): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.addCustomComponent


addInvalidateHandler

addInvalidateHandler(handler): CircularGauge

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

CircularGauge

this

Inherited from

AxisGauge.addInvalidateHandler


addRegion

addRegion(name, region?): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.addRegion


applyOpacity

Protected applyOpacity(context): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

AxisGauge.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

AxisGauge.checkCollision


clearAxes

clearAxes(): void

Clears gauge axes

Returns

void

Inherited from

AxisGauge.clearAxes


clone

clone(): Node

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

Returns

Node

clone

Inherited from

AxisGauge.clone


connectStyle

connectStyle(style, type, callback): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.connectStyle


copyConstructor

Protected copyConstructor(gauge): CircularGauge

Copy constructor function Used to clone gauge

Parameters

Name Type Description
gaugeCircularGaugesource gauge

Returns

CircularGauge

Overrides

AxisGauge.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.disconnectStyle


displayRegions

displayRegions(name?): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.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

AxisGauge.dispose


enableClipping

enableClipping(clipping): CircularGauge

Sets innergroup clipping

Parameters

Name Type Description
clippingbooleanclipping

Returns

CircularGauge

Inherited from

AxisGauge.enableClipping


enableEventPropagation

enableEventPropagation(enable): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.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

AxisGauge.enumerateNodes


execute

execute(delegate): CircularGauge

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

Returns

CircularGauge

The result if any or this

Inherited from

AxisGauge.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: CircularGauge) => T

Returns

T

Inherited from

AxisGauge.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

AxisGauge.filter


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

AxisGauge.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>

Inherited from

AxisGauge.getAxes


getAxis

getAxis(name): CircularAxis

Gets an axis by its name or index from axes iterator

Parameters

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

Returns

CircularAxis

Overrides

AxisGauge.getAxis


getBounds

getBounds(): Rect

Returns current bounds of the gauge

Returns

Rect

Inherited from

AxisGauge.getBounds


getClassName

getClassName(): string

Returns

string

Inherited from

AxisGauge.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

AxisGauge.getClipStyle


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

AxisGauge.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

AxisGauge.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

AxisGauge.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

AxisGauge.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

AxisGauge.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

AxisGauge.getCustomComponents


getFunctionRegistry

getFunctionRegistry(): FunctionRegistry

Returns function registry which provides handlers for gauges animation and alarms

Returns

FunctionRegistry

registry New registry to set

Inherited from

AxisGauge.getFunctionRegistry


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

AxisGauge.getId


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

AxisGauge.getInvalidateMethod


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

Returns the current layout of the gauge

Returns

LayoutStyle<string | number>

Inherited from

AxisGauge.getLayoutStyle


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

AxisGauge.getLocalTransform


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

AxisGauge.getMarginsStyle


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

AxisGauge.getName


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

AxisGauge.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

AxisGauge.getOpacityBlendMode


getPaddingStyle

getPaddingStyle(): SpaceStyle<string | number>

Gets padding style

Returns

SpaceStyle<string | number>


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

AxisGauge.getParent


getProperties

getProperties(): OptionsOut

Returns properties pertaining to this gauge.

Returns

OptionsOut

properties

Overrides

AxisGauge.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

AxisGauge.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

AxisGauge.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

AxisGauge.getRegion


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

AxisGauge.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

AxisGauge.getResponsiveStyle


getRoot

getRoot(): Node

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

Returns

Node

the root node

Inherited from

AxisGauge.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

AxisGauge.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

AxisGauge.getSceneTransform


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

AxisGauge.getTag


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

AxisGauge.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

AxisGauge.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

AxisGauge.getZIndex


hasAxis

hasAxis(axis): boolean

Checks if the gauge contains specified axis

Parameters

Name Type Description
axisstring | AxisThe axis or its name

Returns

boolean

Inherited from

AxisGauge.hasAxis


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

AxisGauge.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

AxisGauge.hasEventListener


hideRegions

hideRegions(): CircularGauge

Hides the regions displayed for debug reasons

Returns

CircularGauge

Inherited from

AxisGauge.hideRegions


invalidate

invalidate(bounds?, force?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.invalidate


invalidateParent

Protected invalidateParent(bounds?, force?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.invalidateParent


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AxisGauge.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

AxisGauge.isEventPropagationEnabled


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

AxisGauge.isNotificationEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

AxisGauge.isSelectable


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

AxisGauge.isSilent


notify

notify<E>(event, source, args?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.notify


off

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

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

Returns

CircularGauge

this

Inherited from

AxisGauge.off


on

on<E>(type, callback): CircularGauge

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

Returns

CircularGauge

this

Inherited from

AxisGauge.on


onParentChanged

Protected onParentChanged(node): CircularGauge

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

Parameters

Name Type Description
nodeNodenode to change parent

Returns

CircularGauge

this

Inherited from

AxisGauge.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

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

Returns

void

Inherited from

AxisGauge.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

AxisGauge.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

AxisGauge.preRendering


reassignAxisName

reassignAxisName(oldName, newName): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.reassignAxisName


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AxisGauge.registerAnimationStyle


removeAxis

removeAxis(name): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.removeAxis


removeCssClass

removeCssClass(cssclass): CircularGauge

Removes css class from node

Parameters

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

Returns

CircularGauge

this

Inherited from

AxisGauge.removeCssClass


removeCustomComponent

removeCustomComponent(component): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.removeCustomComponent


removeInvalidateHandler

removeInvalidateHandler(handler): CircularGauge

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

CircularGauge

this

Inherited from

AxisGauge.removeInvalidateHandler


removeRegion

removeRegion(name): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.removeRegion


render

render(context): CircularGauge

Renders node

Parameters

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

Returns

CircularGauge

Inherited from

AxisGauge.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

AxisGauge.renderAsync


rotate

rotate(theta, x, y): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.rotate


scale

scale(xx, yy): CircularGauge

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

CircularGauge

this

Inherited from

AxisGauge.scale


setAnimationStyle

setAnimationStyle(animationStyle): CircularGauge

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

CircularGauge

Inherited from

AxisGauge.setAnimationStyle


setBounds

setBounds(bounds): CircularGauge

Sets bounds to the gauge

Parameters

Name Type Description
boundsRectNew bounds

Returns

CircularGauge

Inherited from

AxisGauge.setBounds


setClipStyle

setClipStyle(style): CircularGauge

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

CircularGauge

this

Inherited from

AxisGauge.setClipStyle


setCss

setCss(style, merge?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.setCss


setCssClass

setCssClass(name): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.setCssClass


setCssTransform

setCssTransform(transform): CircularGauge

Set CSS transformation

Parameters

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

Returns

CircularGauge

this

Inherited from

AxisGauge.setCssTransform


setFunctionRegistry

setFunctionRegistry(registry): CircularGauge

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

Parameters

Name Type Description
registryFunctionRegistryNew registry to set

Returns

CircularGauge

Inherited from

AxisGauge.setFunctionRegistry


setId

setId(id): CircularGauge

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

CircularGauge

this

Inherited from

AxisGauge.setId


setLayoutStyle

setLayoutStyle(layoutStyle, merge?): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.setLayoutStyle


setLocalTransform

setLocalTransform(localTransform): CircularGauge

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

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node

Returns

CircularGauge

Inherited from

AxisGauge.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.setMarginsStyle


setName

setName(name): CircularGauge

Sets name of the node

Parameters

Name Type Description
namestringThe node name

Returns

CircularGauge

this

Inherited from

AxisGauge.setName


setNotification

setNotification(notify, force?): CircularGauge

set notification state

Parameters

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

Returns

CircularGauge

this

Inherited from

AxisGauge.setNotification


setOpacity

setOpacity(opacity, blendMode?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.setOpacity


setPaddingStyle

setPaddingStyle(style, merge?): CircularGauge

Sets padding style

Parameters

Name Type Description
styleType<string | number>padding style
Optional mergebooleantrue if you want to merge paddingStyle with existing attribute, false by default

Returns

CircularGauge


setProperties

setProperties(props?): CircularGauge

Sets properties pertaining to circulr gauge.

Parameters

Name Type Description
Optional propsOptionsproperties

Returns

CircularGauge

Overrides

AxisGauge.setProperties


setProperty

setProperty(name, value): CircularGauge

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

CircularGauge

this

Inherited from

AxisGauge.setProperty


setRange

setRange(range): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.setRange


setRegionSize

setRegionSize(regionType, size): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.setRegionSize


setRenderingFilter

setRenderingFilter(filter): CircularGauge

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

CircularGauge

this

Inherited from

AxisGauge.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): CircularGauge

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

CircularGauge

this

Inherited from

AxisGauge.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): CircularGauge

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

CircularGauge

this

Inherited from

AxisGauge.setScaleScrollStrategy


setSelectable

setSelectable(selectable): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.setSelectable


setSilent

setSilent(bool): CircularGauge

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

CircularGauge

this

Inherited from

AxisGauge.setSilent


setStartAngle

setStartAngle(angle): CircularGauge

Sets a new start angle

Parameters

Name Type Description
anglenumberAngle in radians

Returns

CircularGauge


setSweepAngle

setSweepAngle(angle): CircularGauge

Sets a new sweep angle

Parameters

Name Type Description
anglenumberAngle in radians

Returns

CircularGauge


setTag

setTag(tag): CircularGauge

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

Parameters

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

Returns

CircularGauge

this

Inherited from

AxisGauge.setTag


setValue

setValue(val, skipAnimation?): CircularGauge

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

CircularGauge

Inherited from

AxisGauge.setValue


setVisible

setVisible(value): CircularGauge

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

CircularGauge

this

Inherited from

AxisGauge.setVisible


setZIndex

setZIndex(value): CircularGauge

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

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

CircularGauge

this

Inherited from

AxisGauge.setZIndex


shear

shear(shx, shy): CircularGauge

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

CircularGauge

this

Inherited from

AxisGauge.shear


toString

toString(): string

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

Returns

string

A string representation

Inherited from

AxisGauge.toString


translate

translate(tx, ty): CircularGauge

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

CircularGauge

this

Inherited from

AxisGauge.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

AxisGauge.unregisterAnimationStyle


update

update(): CircularGauge

Updates and recalculates parameters of gauge, like radius, angles, and updates axes.

Returns

CircularGauge


updateSceneTransformation

updateSceneTransformation(): CircularGauge

Update scene transformation

Returns

CircularGauge

this

Inherited from

AxisGauge.updateSceneTransformation


updateState

updateState(regions?, changes?): CircularGauge

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

CircularGauge

this

Inherited from

AxisGauge.updateState


updateTimeStamp

Protected updateTimeStamp(): CircularGauge

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

Returns

CircularGauge

this

Inherited from

AxisGauge.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

AxisGauge.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

AxisGauge.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

AxisGauge.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

AxisGauge.getClassName


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

AxisGauge.isSceneGraphNotificationEnabled