Last updated

API / geotoolkit / gauges / axis / CircularAxis / CircularAxis

Class: CircularAxis

axis.CircularAxis.CircularAxis

Implements an axis which uses Tick Generators to calculate number of ticks and their positions. This axis calculates the ticks dynamically to not allow any intersections among labels and ticks. The axis allows to render ticks and labels in three positions: inside: tick growing from the inner bound of the axis towards the center outside: tick growing from outer bound of axis towards the center

Hierarchy

  • Axis

    CircularAxis

Table of contents

Constructors
Methods
addAlarmaddCssClassaddInvalidateHandler
addRegionapplyOpacityapplyResponsiveStyle
checkCollisioncleanAlarmscleanRegions
cloneconnectStylecopyConstructor
disconnectStyledisposeenableEventPropagation
enumerateNodesexecutefilter
getAlarmgetAlarmsgetAnimation
getAnimationStylegetAnimationTimegetBounds
getClassNamegetClipStylegetCss
getCssClassgetCssClassesgetCssTransform
getFunctionRegistrygetIdgetInvalidateMethod
getLabelPropertiesgetLocalTransformgetMarginsStyle
getModelLimitsgetNamegetNameProperties
getNeedleGeometrygetNeedleOptionsgetNeedlePosition
getOpacitygetOpacityBlendModegetParent
getPropertiesgetPropertygetPropertyKeys
getRangegetRenderingFiltergetResponsiveStyle
getRootgetScaleScrollStrategygetSceneTransform
getShadowColorgetShadowPropertiesgetTag
getTickGeneratorgetTickPropertiesgetValue
getValuePropertiesgetVisiblegetWorldTransform
getZIndexhasCssClasshasEventListener
invalidateinvalidateParentisDisposed
isEventPropagationEnabledisNotificationEnabledisSelectable
isSilentnotifyoff
ononParentChangedonVisibilityChanged
postRenderingpreRenderingredraw
registerAnimationStyleremoveAlarmremoveCssClass
removeInvalidateHandlerrenderrenderAsync
rotatescalesetAnimation
setAnimationStylesetAnimationTimesetBounds
setClipStylesetCsssetCssClass
setCssTransformsetFunctionRegistrysetId
setLabelPropertiessetLocalTransformsetMarginsStyle
setNamesetNamePropertiessetNeedle
setNeedleOptionssetNeedleVisiblesetNotification
setOpacitysetPropertiessetProperty
setRangesetRenderingFiltersetResponsiveStyle
setScaleScrollStrategysetSelectablesetShadowColor
setShadowPropertiessetSilentsetTag
setTickGeneratorsetTickPropertiessetValue
setValuePropertiessetVisiblesetZIndex
sheartoStringtranslate
unregisterAnimationStyleupdateSceneTransformationupdateState
updateTimeStampenableSceneGraphNotificationfindParent
getClassNameisSceneGraphNotificationEnabled
Css Properties
Name Type Description
alarmsAlarmAlarm to add, an array of such alarms, or object (array of objects) to be passed into the alarm
alarms-handlernamestringName of the handler function as defined in Alarm Factory
alarms-highnumberUpper boundary of range that the alarm is effective on
alarms-lownumberLower boundary of range that the alarm is effective on
alarms-namestringName of the alarm for indexing
alarms-rangeRangeRange that the alarm is effective on
alarms-range-highnumberUpper range boundary
alarms-range-lownumberLower range boundary
alarms-range-maxnumber
alarms-range-minnumber
animationfunctionFunctionsName of animation function
animationtimenumberAnimation time
centerPointCenter
center-xnumberX coordinate
center-ynumberY coordinate
clipstyleClipStyleClipping style
clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
clipstyle-geometryGraphicsPathClipping geometry
clipstyle-geometry-boundsRectBounds
clipstyle-geometry-bounds-heightnumberHeight
clipstyle-geometry-bounds-readonlybooleanReadonly
clipstyle-geometry-bounds-widthnumberWidth
clipstyle-geometry-bounds-xnumberLeft
clipstyle-geometry-bounds-ynumberTop
clipstyleGraphicsPathClipping style
cssclassstringThe css class name of this node
csscursorstringCSS cursor associated with node
cssstylestringCSS style to be applied to inserted elements
endangleoffsetnumber | stringThe distance (offset) of the start angle of the axis from start angle of the gauge. Shrinks the axis counterclockwise
fillstylestringFill style of the base arc of the axis
fillstyleFillStyleFill style of the base arc of the axis
fillstyle-colorstringColor in CSS form
fillstyle-evenoddmodebooleanEven-odd fill mode
fillstyle-fillpatternPatternPattern
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
fillstyle-fillpattern-patternnamestringName of this pattern for indexing
fillstyle-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
fillstyle-foregroundstringForeground color
fillstyle-patternPatternPattern
idstring | numberId of the node, its a unique identifier
linestylestringLine style for main region
linestyleLineStyleLine style for main region
linestyle-colorstringColor in CSS form
linestyle-fillstringOptional fill style to be used to fill lines generated with this style
linestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
linestyle-linecapCapStyleThe line cap style
linestyle-linedashoffsetnumberLine dash offset of dashed line
linestyle-linejoinJoinStyleThe line join style
linestyle-pixelsnapmodebooleanPixel Snap Mode, default(
linestyle-scalablebooleanTrue if width should depend on transformation
linestyle-unitstringOptional unit for the width
linestyle-widthnumber | stringThe line thickness
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
needleOptionsProperties defining the needle
needle-cssclassstringThe css class name of this node
needle-idstring | numberId of the node, its a unique identifier
needle-namestringName of the node. It is often used for debugging purposes or to simplify queries
needle-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
needle-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
needle-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
needle-z-indexnumberDefine node z-index
needleNeedleOptionsProperties defining the needle
needle-centerPointA point in model of needle which serves as an anchor point for rotation and centering the needle with the gauge
needle-geometryGroupGeotoolkit group containing the shapes which form the geometry of the needle
needle-geometry-automodellimitsmodebooleanAuto model limits mode
needle-geometry-boundsRectDefine position of the group in the parent
needle-geometry-clippingbooleanEnable clipping, this does not consider the clipstyle, it is related to bounds-clipping
needle-geometry-clipstyleClipStyleClipping style
needle-geometry-clipstyleGraphicsPathClipping style
needle-geometry-contentorientationOrientationContent orientation
needle-geometry-cssclassstringThe css class name of this node
needle-geometry-csscursorstringCSS cursor associated with node
needle-geometry-cssstylestringCSS style to be applied to inserted elements
needle-geometry-fillstylestringFill style
needle-geometry-fillstyleFillStyleFill style
needle-geometry-horizontalflipbooleanHorizontal axis goes from right to left
needle-geometry-idstring | numberId of the node, its a unique identifier
needle-geometry-infinitybooleanMode to render outside the model limits
needle-geometry-layoutstyleLayoutStyleLayout style to be used for parent layout
needle-geometry-layoutstyle-constraintSizeConstraintLayout constrains
needle-geometry-layoutstyle-flexgrownumberNumber specifying how much the item will grow relative to the rest of the items inside the same container
needle-geometry-layoutstyle-flexshrinknumberNumber specifying how much the item will shrink relative to the rest of the items inside the same container
needle-geometry-layoutstyle-floatstringFloat position
needle-geometry-layoutstyle-positionstringLayout position
needle-geometry-layoutstyle-sizenumber | stringLayout size
needle-geometry-linestylestringLine style
needle-geometry-linestyleLineStyleLine style
needle-geometry-localtransformTransformationLocal transformation
needle-geometry-marginsnumber | stringIt has properties for specifying the margins for each side
needle-geometry-modellimitsRectDefine inner model coordinates of the group
needle-geometry-namestringName of the node. It is often used for debugging purposes or to simplify queries
needle-geometry-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
needle-geometry-opacityblendmodeBlendModeNode opacity mode to blend it
needle-geometry-paddingnumber | stringIt has properties for specifying the padding for each side
needle-geometry-pickingchildrenbooleanEnable picking children
needle-geometry-scalescrollstrategyScaleScrollStrategyScale scroll strategy
needle-geometry-scalescrollstrategy-enabledbooleanEnable flag
needle-geometry-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
needle-geometry-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
needle-geometry-transformstringAdditional CSS transformation applied to node or 'none'
needle-geometry-transformTransformationAdditional CSS transformation applied to node or 'none'
needle-geometry-verticalflipbooleanVertical axis goes from bottom to top
needle-geometry-viewcachebooleanView cache to cache child nodes
needle-geometry-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
needle-geometry-z-indexnumberDefine node z-index
needle-positionDynamicElementPositionLayer on which the needle should be positioned, either in front of all components, or in the back
needle-radiusnumber | stringFor circular needle the length of the needle relative to the radius of the axis. The length will be calculated automatically and if the needle has to be enlarged or shrinked, this will be done with preservation of aspect ratio
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
parentradiusnumber | stringParent radius
radiusnumber | stringRadius of the axis in CSS format (relative to gauge radius)
rangeRangeRange see
reversedbooleanAngles counting orientation relative to gauge
scalescrollstrategyScaleScrollStrategyScale scroll strategy
selectablebooleanSelectable node, a boolean to determine if selection should consider this node
shadowShadowOptionsJSON with shadow properties
shadow-colorstringColor of the filling of the gauge shadows
shadow-innerradiusnumberInner radius (axis's inner by default)
shadow-linecapCapStyleStyle of the edges of the shadow
shadow-outerradiusnumberOuter radius (axis's outer by default)
shadow-positionDynamicElementPositionShadow position
shadow-visiblebooleanVisibility flag for the shadow
startanglenumber | stringStart angle
startangleoffsetnumber | stringThe distance (offset) of the start angle of the axis from start angle of the gauge. Rotates the axis clockwise
sweepanglenumber | stringSweep angle
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
thicknessnumber | stringThickness of the axis base in CSS format (relative to the radius of the axis)
tickgeneratorTickGeneratorThe tick generator for the axis
tickgenerator-labelstylesTextStyleAn object containing label style for specified grades
tickgenerator-labelstyles-alignmentAlignmentStyleAlignment
tickgenerator-labelstyles-autosizebooleanAuto font size on high definition display
tickgenerator-labelstyles-backgroundstringBackground style
tickgenerator-labelstyles-backgroundFillStyleBackground style
tickgenerator-labelstyles-baselineBaseLineStyleBase line
tickgenerator-labelstyles-colorstringColor in CSS form
tickgenerator-labelstyles-fillFillStyleText fill style
tickgenerator-labelstyles-fontstringFont see
tickgenerator-labelstyles-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
tickgenerator-labelstyles-lineheightstring | numberLine height
tickgenerator-labelstyles-multilinebooleanAllow multi-line text
tickgenerator-labelstyles-outlinestringOutline style
tickgenerator-labelstyles-outlineLineStyleOutline style
tickgenerator-labelstyles-overflowwrapOverflowWrapStyleOverflow wrap
tickgenerator-labelstyles-strikethroughstringStrikethrough style
tickgenerator-labelstyles-strikethroughLineStyleStrikethrough style
tickgenerator-labelstyles-textoverflowTextOverflowStyleText overflow
tickgenerator-labelstyles-underlinestringUnderline style
tickgenerator-labelstyles-underlineLineStyleUnderline style
tickgenerator-labelstyles-underlineoffsetstring | numberUnderline offset distance
tickgenerator-labelstyles-whitespaceWhiteSpaceStyleWhite space
tickgenerator-labelstyles-wordbreakWordBreakStyleWord break
tickgenerator-taganyTag user can specify info associated with current object
tickgenerator-tickstylesLineStyleAn object containing tick styles for specified grades
transformstringAdditional CSS transformation applied to node or 'none'
transformTransformationAdditional CSS transformation applied to node or 'none'
unitsstringUnits to append to the end
valuenumberValue of the axis
visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
z-indexnumberDefine node z-index

Contents

Constructors

new CircularAxis(options)

new CircularAxis(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

Axis.constructor

Methods

addAlarm

addAlarm(alarm): CircularAxis

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 | Options | Options[] | Alarm[]An alarm to add, an array of such alarms, or object (array of objects) to be passed into the alarm

Returns

CircularAxis

this

Inherited from

Axis.addAlarm


addCssClass

addCssClass(cssclass): CircularAxis

Adds new css class to node

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.addCssClass


addInvalidateHandler

addInvalidateHandler(handler): CircularAxis

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

CircularAxis

this

Inherited from

Axis.addInvalidateHandler


addRegion

addRegion(regions): CircularAxis

Adds a region or an array of regions to the axis. Regions are defined by color and range in bounds of the range displayed by the gauge.

Parameters

Name Type Description
regionsRegion | Region[] | Options | Options[]Array of regions, a region, or region properties

Returns

CircularAxis

Inherited from

Axis.addRegion


applyOpacity

Protected applyOpacity(context): CircularAxis

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

CircularAxis

this

Inherited from

Axis.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

Axis.applyResponsiveStyle


checkCollision

checkCollision(context): boolean

Check if this node is within the area being rendered by the context

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

true if object is inside of renderable area

Inherited from

Axis.checkCollision


cleanAlarms

cleanAlarms(): CircularAxis

Removes all registered alarms

Returns

CircularAxis

Inherited from

Axis.cleanAlarms


cleanRegions

cleanRegions(): CircularAxis

Removes all registered regions from the axis

Returns

CircularAxis

Inherited from

Axis.cleanRegions


clone

clone(): Node

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

Returns

Node

clone

Inherited from

Axis.clone


connectStyle

connectStyle(style, type, callback): CircularAxis

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

CircularAxis

this

Inherited from

Axis.connectStyle


copyConstructor

Protected copyConstructor(src, deepCopy?): CircularAxis

Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.

Parameters

Name Type Description
srcAbstractNodeSource to copy from
Optional deepCopybooleandeep copy

Returns

CircularAxis

this

Inherited from

Axis.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): CircularAxis

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

CircularAxis

this

Inherited from

Axis.disconnectStyle


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. Disposes value and name shapes as well

Returns

void

Overrides

Axis.dispose


enableEventPropagation

enableEventPropagation(enable): CircularAxis

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

CircularAxis

this

Inherited from

Axis.enableEventPropagation


enumerateNodes

enumerateNodes(callback, target?): void

Enumerate children nodes

Parameters

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

Returns

void

Inherited from

Axis.enumerateNodes


execute

execute(delegate): CircularAxis

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

Returns

CircularAxis

The result if any or this

Inherited from

Axis.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: CircularAxis) => T

Returns

T

Inherited from

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

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

Inherited from

Axis.getAlarm


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 null

Returns

Iterator<Alarm>

Inherited from

Axis.getAlarms


getAnimation

getAnimation(): string

Returns the name of animation function associated with this axis

Returns

string

Inherited from

Axis.getAnimation


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

Axis.getAnimationStyle


getAnimationTime

getAnimationTime(): number

Returns time in which an animation should be finished in seconds

Returns

number

Inherited from

Axis.getAnimationTime


getBounds

getBounds(): Rect

Gets bound of the axis

Returns

Rect

Inherited from

Axis.getBounds


getClassName

getClassName(): string

Returns

string

Inherited from

Axis.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

Axis.getClipStyle


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

Axis.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

Axis.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

Axis.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

Axis.getCssTransform


getFunctionRegistry

getFunctionRegistry(): FunctionRegistry

Returns function registry which provides handlers for gauges animation and alarms

Returns

FunctionRegistry

registry New registry to set

Inherited from

Axis.getFunctionRegistry


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

Axis.getId


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

Axis.getInvalidateMethod


getLabelProperties

getLabelProperties(grade): LabelOptionsOut

Returns properties pertaining to labels of requested grade

Parameters

Name Type Description
gradestringtick grade ('edge', 'major', 'minor')

Returns

LabelOptionsOut

properties

Inherited from

Axis.getLabelProperties


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

Axis.getLocalTransform


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

Axis.getMarginsStyle


getModelLimits

getModelLimits(): Rect

Returns

Rect


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

Axis.getName


getNameProperties

getNameProperties(): NameOptionsOut

Returns properties pertaining to name text

Returns

NameOptionsOut

properties

Inherited from

Axis.getNameProperties


getNeedleGeometry

getNeedleGeometry(): Group<Node>

Gets the current needle geometry

Returns

Group<Node>


getNeedleOptions

getNeedleOptions(): NeedleOptionsOut

Gets properties pertaining to needle

Returns

NeedleOptionsOut

properties


getNeedlePosition

getNeedlePosition(): string

Gets position of the needle (bottom layer or top layer)

Returns

string


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

Axis.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

Axis.getOpacityBlendMode


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

Axis.getParent


getProperties

getProperties(): OptionsOut

Returns an object with properties pertaining to this axis

Returns

OptionsOut

Object with properties

Overrides

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

Axis.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

Axis.getPropertyKeys


getRange

getRange(): Range

Returns the range of this axis

Returns

Range

Inherited from

Axis.getRange


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

Axis.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

Axis.getResponsiveStyle


getRoot

getRoot(): Node

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

Returns

Node

the root node

Inherited from

Axis.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

Axis.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

Axis.getSceneTransform


getShadowColor

getShadowColor(): string

Gets the color of shadow fill for the gauge

Returns

string

color


getShadowProperties

getShadowProperties(): ShadowOptionsOut

Gets properties pertaining to shadow of the axis

Returns

ShadowOptionsOut

properties


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

Axis.getTag


getTickGenerator

getTickGenerator(): TickGenerator

Returns the tick generator pertaining to this axis

Returns

TickGenerator

Overrides

Axis.getTickGenerator


getTickProperties

getTickProperties(grade): TickOptionsOut

Returns properties of the tick with provided grade

Parameters

Name Type Description
gradestringtick grade ('edge', 'major', 'minor')

Returns

TickOptionsOut

Inherited from

Axis.getTickProperties


getValue

getValue(ignoreNaN?): number

Returns the value of the axis

Parameters

Name Type Description
Optional ignoreNaNbooleanif true, pass last real value

Returns

number

Inherited from

Axis.getValue


getValueProperties

getValueProperties(): ValueOptionsOut

Returns an object with properties pertaining to the value shape

Returns

ValueOptionsOut

properties

Inherited from

Axis.getValueProperties


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

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

Axis.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

Axis.getZIndex


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

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

Axis.hasEventListener


invalidate

invalidate(bounds?, force?): CircularAxis

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

CircularAxis

this

Inherited from

Axis.invalidate


invalidateParent

Protected invalidateParent(bounds?, force?): CircularAxis

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

CircularAxis

this

Inherited from

Axis.invalidateParent


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Axis.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

Axis.isEventPropagationEnabled


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

Axis.isNotificationEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

Axis.isSelectable


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

Axis.isSilent


notify

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

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.notify


off

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

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

Returns

CircularAxis

this

Inherited from

Axis.off


on

on<E>(type, callback): CircularAxis

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

Returns

CircularAxis

this

Inherited from

Axis.on


onParentChanged

Protected onParentChanged(node): CircularAxis

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

Parameters

Name Type Description
nodeNodenode to change parent

Returns

CircularAxis

this

Inherited from

Axis.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

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

Returns

void

Inherited from

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

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

Axis.preRendering


redraw

redraw(): CircularAxis

Recalculates the parameters of the axis and rerenders

Returns

CircularAxis

this

Inherited from

Axis.redraw


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

Axis.registerAnimationStyle


removeAlarm

removeAlarm(name): CircularAxis

Removes an alarm by its name, index, or instance of alarm

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.removeAlarm


removeCssClass

removeCssClass(cssclass): CircularAxis

Removes css class from node

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.removeCssClass


removeInvalidateHandler

removeInvalidateHandler(handler): CircularAxis

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

CircularAxis

this

Inherited from

Axis.removeInvalidateHandler


render

render(context): void

Renders the axis and ticks

Parameters

Name Type Description
contextRenderingContextrendering context

Returns

void

Overrides

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

Axis.renderAsync


rotate

rotate(theta, x, y): CircularAxis

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

CircularAxis

this

Inherited from

Axis.rotate


scale

scale(xx, yy): CircularAxis

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

CircularAxis

this

Inherited from

Axis.scale


setAnimation

setAnimation(name): CircularAxis

Sets the name of animation function corresponding to this axis

Parameters

Name Type Description
namestringNew function name

Returns

CircularAxis

Inherited from

Axis.setAnimation


setAnimationStyle

setAnimationStyle(animationStyle): CircularAxis

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

CircularAxis

Inherited from

Axis.setAnimationStyle


setAnimationTime

setAnimationTime(time): CircularAxis

Sets time in which an animation should be finished in seconds

Parameters

Name Type Description
timenumberTime in seconds to perform the animation

Returns

CircularAxis

this

Inherited from

Axis.setAnimationTime


setBounds

Protected setBounds(bounds): CircularAxis

Sets bounds of the axis

Parameters

Name Type Description
boundsRectbounds of axis

Returns

CircularAxis

Inherited from

Axis.setBounds


setClipStyle

setClipStyle(style): CircularAxis

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

CircularAxis

this

Inherited from

Axis.setClipStyle


setCss

setCss(style, merge?): CircularAxis

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

CircularAxis

this

Inherited from

Axis.setCss


setCssClass

setCssClass(name): CircularAxis

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

CircularAxis

this

Inherited from

Axis.setCssClass


setCssTransform

setCssTransform(transform): CircularAxis

Set CSS transformation

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.setCssTransform


setFunctionRegistry

setFunctionRegistry(registry): CircularAxis

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

Parameters

Name Type Description
registryFunctionRegistryNew registry to set

Returns

CircularAxis

Inherited from

Axis.setFunctionRegistry


setId

setId(id): CircularAxis

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

CircularAxis

this

Inherited from

Axis.setId


setLabelProperties

setLabelProperties(grade, props): CircularAxis

Sets properties pertaining to labels for ticks of provided grade

Parameters

Name Type Description
gradestringGrade of the ticks that properties should be applied to
propsLabelOptionsproperties

Returns

CircularAxis

Inherited from

Axis.setLabelProperties


setLocalTransform

setLocalTransform(localTransform, force?): CircularAxis

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

Parameters

Name Type Description
localTransformTransformationlocal transformation for this node
Optional forcebooleanboolean flag to force update event if transformations are equal, false by default

Returns

CircularAxis

this

Inherited from

Axis.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): CircularAxis

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

CircularAxis

this

Inherited from

Axis.setMarginsStyle


setName

setName(name): CircularAxis

Changes the name of the axis

Parameters

Name Type Description
namestringThe new axis name

Returns

CircularAxis

this

Inherited from

Axis.setName


setNameProperties

setNameProperties(props): CircularAxis

Sets properties pertaining to name shape of the gauge

Parameters

Name Type Description
propsNameOptionsproperties

Returns

CircularAxis

Inherited from

Axis.setNameProperties


setNeedle

setNeedle(params): CircularAxis

Sets the needle for the axis

Parameters

Name Type Description
paramsNeedleOptionsJSON with needle properties

Returns

CircularAxis

this


setNeedleOptions

setNeedleOptions(props): CircularAxis

Sets options pertaining to the needle

Parameters

Name Type Description
propsNeedleOptionsproperties

Returns

CircularAxis


setNeedleVisible

setNeedleVisible(visible): CircularAxis

Shows or hides the needle

Parameters

Name Type Description
visiblebooleanVisibility flag for the needle

Returns

CircularAxis


setNotification

setNotification(notify, force?): CircularAxis

set notification state

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.setNotification


setOpacity

setOpacity(opacity, blendMode?): CircularAxis

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

CircularAxis

this

Inherited from

Axis.setOpacity


setProperties

setProperties(props?): CircularAxis

Sets properties pertaining to this axis

Parameters

Name Type Description
Optional propsOptionsObject with properties

Returns

CircularAxis

Overrides

Axis.setProperties


setProperty

setProperty(name, value): CircularAxis

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

CircularAxis

this

Inherited from

Axis.setProperty


setRange

setRange(range): CircularAxis

Sets a new data range displayed by this axis

Parameters

Name Type Description
rangeRangeInNew range to set

Returns

CircularAxis

Inherited from

Axis.setRange


setRenderingFilter

setRenderingFilter(filter): CircularAxis

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

CircularAxis

this

Inherited from

Axis.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): CircularAxis

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

CircularAxis

this

Inherited from

Axis.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): CircularAxis

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

CircularAxis

this

Inherited from

Axis.setScaleScrollStrategy


setSelectable

setSelectable(selectable): CircularAxis

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

CircularAxis

this

Inherited from

Axis.setSelectable


setShadowColor

setShadowColor(color): CircularAxis

Sets the color of shadow fill for the gauge

Parameters

Name Type Description
colorstring | RgbaColorNew color of the value fill

Returns

CircularAxis

this


setShadowProperties

setShadowProperties(props): CircularAxis

Sets properties pertaining to shadow of the axis

Parameters

Name Type Description
propsShadowOptionsproperties

Returns

CircularAxis

this


setSilent

setSilent(bool): CircularAxis

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

CircularAxis

this

Inherited from

Axis.setSilent


setTag

setTag(tag): CircularAxis

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

Parameters

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

Returns

CircularAxis

this

Inherited from

Axis.setTag


setTickGenerator

setTickGenerator(tickGenerator): CircularAxis

Sets a new tick generator on the axis

Parameters

Name Type Description
tickGeneratorTickGeneratortick generator

Returns

CircularAxis

Overrides

Axis.setTickGenerator


setTickProperties

setTickProperties(grade, props): CircularAxis

Sets the properties pertaining to the ticks of provided grade

Parameters

Name Type Description
gradestringGrade of the tick to apply properties to
propsTickOptionsproperties

Returns

CircularAxis

Inherited from

Axis.setTickProperties


setValue

setValue(val, skipAnimation?): CircularAxis

Sets the value of the axis

Parameters

Name Type Description
valnumberThe value to be displayed by the axis.
Optional skipAnimationbooleanIf true, no animation will be displayed

Returns

CircularAxis

Overrides

Axis.setValue


setValueProperties

setValueProperties(props): CircularAxis

Sets properties pertaining to value shape of the gauge

Parameters

Name Type Description
propsValueOptionsproperties

Returns

CircularAxis

Inherited from

Axis.setValueProperties


setVisible

setVisible(value): CircularAxis

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

CircularAxis

this

Inherited from

Axis.setVisible


setZIndex

setZIndex(value): CircularAxis

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

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

CircularAxis

this

Inherited from

Axis.setZIndex


shear

shear(shx, shy): CircularAxis

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

CircularAxis

this

Inherited from

Axis.shear


toString

toString(): string

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

Returns

string

A string representation

Inherited from

Axis.toString


translate

translate(tx, ty): CircularAxis

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

CircularAxis

this

Inherited from

Axis.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

Axis.unregisterAnimationStyle


updateSceneTransformation

updateSceneTransformation(): CircularAxis

Update scene transformation

Returns

CircularAxis

this

Inherited from

Axis.updateSceneTransformation


updateState

updateState(regions?, changes?): CircularAxis

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

CircularAxis

this

Inherited from

Axis.updateState


updateTimeStamp

Protected updateTimeStamp(): CircularAxis

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

Returns

CircularAxis

this

Inherited from

Axis.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

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

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

Axis.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

Axis.getClassName


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

Axis.isSceneGraphNotificationEnabled