Last updated

API / geotoolkit / controls / shapes / ColorBar / ColorBar

Class: ColorBar

shapes.ColorBar.ColorBar

Defines a color bar shape. The ColorBar shape is an advanced shape that can display a colorprovider as a legend.
It will render the colors from the colorprovider along with an axis and the corresponding ticks & labels.

Hierarchy

Table of contents

Constructors
Methods
addBaseLayeraddChildaddCssClass
addInvalidateHandleraddOverlayadjustPosition
applyOpacityapplyResponsiveStylechangeBaseLayerOrder
changeChildOrderchangeOverlayOrdercheckCollision
clearBaseLayersclearCacheclearChildren
clearOverlayscloneconnectStyle
copyConstructordisconnectStyledispose
drawBorderenableClippingenableEventPropagation
enablePickingChildrenenumerateNodesexecute
filtergetAnimationStylegetAutoModelLimitsMode
getAutoModelLimitsStrategygetBaseLayergetBaseLayers
getBaseLayersCountgetBoundsgetCache
getChildgetChildrengetChildrenCount
getClassNamegetClipStylegetColorProvider
getContentOrientationgetContentsAreagetContentsTransform
getCssgetCssClassgetCssClasses
getCssTransformgetDesiredHeightgetDesiredWidth
getDeviceLimitsgetFillStylegetId
getInfiniteModegetInvalidateMethodgetLayout
getLayoutStylegetLineStylegetLocalTransform
getLocationgetMarginsStylegetMarkerPlotPoint
getMarkerProperiesgetModelLimitsgetName
getOpacitygetOpacityBlendModegetOptions
getOverlaygetOverlayAtgetOverlays
getOverlaysCountgetPaddingStylegetParent
getPointAtValuegetPreferredSizegetProperties
getPropertygetPropertyKeysgetRenderingFilter
getResponsiveStylegetRootgetScaleScrollStrategy
getSceneTransformgetTaggetTickGenerator
getVisiblegetVisibleDeviceLimitsgetVisibleModelLimits
getWorldTransformgetZIndexhasCssClass
hasEventListenerhideMarkerindexOfBaseLayer
indexOfChildindexOfOverlayinsertBaseLayer
insertChildinsertOverlayinvalidate
invalidateLayoutinvalidateParentisClippingEnabled
isDisposedisEventPropagationEnabledisHorizontalFlip
isLayoutInvalidatedisNotificationEnabledisPickingChildrenEnabled
isSelectableisSilentisVerticalFlip
moveTonotifynotifyRoot
offononBoundsChanged
onChildAddedonChildRemovedonParentChanged
onVisibilityChangedpostRenderingpreRendering
rebuildregisterAnimationStyleremoveBaseLayer
removeChildremoveCssClassremoveInvalidateHandler
removeOverlayrenderrenderAsync
renderBackgroundrenderBaseLayersrenderBaseLayersAsync
renderChildrenrenderChildrenAsyncrenderContent
renderContentAsyncrenderOverlaysrenderOverlaysAsync
resumeUpdaterotatescale
setAnimationStylesetAutoModelLimitsModesetAutoModelLimitsStrategy
setBoundssetCachesetChild
setClipStylesetContentOrientationsetCss
setCssClasssetCssTransformsetDesiredHeight
setDesiredWidthsetFillStylesetHorizontalFlip
setIdsetInfiniteModesetLayout
setLayoutInvalidatedsetLayoutStylesetLineStyle
setLocalTransformsetMarginsStylesetMarkerPosition
setMarkerProperiessetModelLimitssetName
setNotificationsetOpacitysetOptions
setPaddingStylesetPropertiessetProperty
setRenderingFiltersetResponsiveStylesetScaleScrollStrategy
setSelectablesetSilentsetTag
setTickGeneratorsetVerticalFlipsetVisible
setVisibleModelLimitssetZIndexshear
showMarkersuspendUpdatetoString
translateunregisterAnimationStyleupdateLayout
updateSceneTransformationupdateStateupdateSuspended
updateTimeStampenableSceneGraphNotificationfindParent
getClassNameisSceneGraphNotificationEnabled
Css Properties
Name Type Description
automodellimitsmodebooleanAuto model limits mode
axisautolabelrotationbooleanAxis auto label rotation
axisautolabelrotationanglenumberAxis auto label rotation angle
axisbaselinestylestringAxis baseline style
axisbaselinestyleLineStyleAxis baseline style
axisbaselinestyle-colorstringColor in CSS form
axisbaselinestyle-fillstringOptional fill style to be used to fill lines generated with this style
axisbaselinestyle-fillFillStyleOptional fill style to be used to fill lines generated with this style
axisbaselinestyle-fill-colorstringColor in CSS form
axisbaselinestyle-fill-evenoddmodebooleanEven-odd fill mode
axisbaselinestyle-fill-fillpatternPatternPattern
axisbaselinestyle-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
axisbaselinestyle-fill-fillpattern-patternnamestringName of this pattern for indexing
axisbaselinestyle-fill-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
axisbaselinestyle-fill-foregroundstringForeground color
axisbaselinestyle-fill-patternPatternPattern
axisbaselinestyle-linecapCapStyleThe line cap style
axisbaselinestyle-linedashoffsetnumberLine dash offset of dashed line
axisbaselinestyle-linejoinJoinStyleThe line join style
axisbaselinestyle-pixelsnapmodebooleanPixel Snap Mode, default(
axisbaselinestyle-scalablebooleanTrue if width should depend on transformation
axisbaselinestyle-unitstringOptional unit for the width
axisbaselinestyle-widthnumber | stringThe line thickness
axisbaselinevisiblebooleanAxis baseline visibility
axisitemAxisAxis item
axisitem-autolabelrotationbooleanAutomatic label rotation
axisitem-autolabelrotationanglenumber
axisitem-baselinestylestringBase line style
axisitem-baselinestyleLineStyleBase line style
axisitem-boundsRectAxis bounds
axisitem-bounds-heightnumberHeight
axisitem-bounds-readonlybooleanReadonly
axisitem-bounds-widthnumberWidth
axisitem-bounds-xnumberLeft
axisitem-bounds-ynumberTop
axisitem-clipstyleClipStyleClipping style
axisitem-clipstyle-evenoddbooleanTrue if evenodd mode is on ('nonzero' mode otherwise)
axisitem-clipstyle-geometryGraphicsPathClipping geometry
axisitem-clipstyle-geometry-boundsRectBounds
axisitem-clipstyleGraphicsPathClipping style
axisitem-cssclassstringThe css class name of this node
axisitem-csscursorstringCSS cursor associated with node
axisitem-cssstylestringCSS style to be applied to inserted elements
axisitem-dimensionAxisMappingDimensionAxis dimension to setup axis limits
axisitem-dimension-desiredmodelstepnumberDesired model step
axisitem-dimension-logarithmicbooleanTrue for logarithmic axis
axisitem-dimension-maxnumberMaximum value
axisitem-dimension-minnumberMinimum value
axisitem-dimension-minspannumberDesired minimum distance between ticks in pixels
axisitem-dimension-namestringName of the dimension
axisitem-dimension-neatlimitsbooleanEnable or disable neat limits
axisitem-dimension-orientationOrientationAxis orientation
axisitem-dimension-originnumber
axisitem-dimension-preciselimitsbooleanEnable keeping the precise limits and calculate only step
axisitem-dimension-spacingnumberDesired model spacing
axisitem-fillstylestringStyle applied on fill
axisitem-fillstyleFillStyleStyle applied on fill
axisitem-hideoverlappedtextbooleanHide overlapped text flag
axisitem-idstring | numberId of the node, its a unique identifier
axisitem-infinitybooleanInfinity mode
axisitem-labelmanualsettingsbooleanEnable / disable manual settings for labels like anchor
axisitem-labeloffsetnumberOffset the label offset
axisitem-labelpaddingnumberLabel padding size in pixels
axisitem-labelpositionLabelPositionLabel position
axisitem-layoutstyleLayoutStyleDesired layout style
axisitem-layoutstyle-constraintSizeConstraintLayout constrains
axisitem-layoutstyle-flexgrownumberNumber specifying how much the item will grow relative to the rest of the items inside the same container
axisitem-layoutstyle-flexshrinknumberNumber specifying how much the item will shrink relative to the rest of the items inside the same container
axisitem-layoutstyle-floatstringFloat position
axisitem-layoutstyle-positionstringLayout position
axisitem-layoutstyle-sizenumber | stringLayout size
axisitem-linestylestringStyle applied on outline
axisitem-linestyleLineStyleStyle applied on outline
axisitem-localtransformTransformationLocal transformation
axisitem-localtransform-dxnumberX axis translation
axisitem-localtransform-dynumberY axis translation
axisitem-localtransform-xxnumberX scale
axisitem-localtransform-xynumberXy skew
axisitem-localtransform-yxnumberYx skew
axisitem-localtransform-yynumberY scale
axisitem-marginsnumber | stringIt has properties for specifying the margins for each side
axisitem-maximumlabelsizenumberMaximum label size (in device), text will be wrapped, if it is bigger than maximum label size
axisitem-modellimitsRectRectangle where to generate ticks
axisitem-namestringName of the node. It is often used for debugging purposes or to simplify queries
axisitem-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
axisitem-opacityblendmodeBlendModeNode opacity mode to blend it
axisitem-orientationOrientationAxis orientation
axisitem-scalescrollstrategyScaleScrollStrategyScale scroll strategy
axisitem-scalescrollstrategy-enabledbooleanEnable flag
axisitem-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
axisitem-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
axisitem-textstylestringLabels textstyle
axisitem-textstyleTextStyleLabels textstyle
axisitem-textstyle-alignmentAlignmentStyleAlignment
axisitem-textstyle-autosizebooleanAuto font size on high definition display
axisitem-textstyle-backgroundstringBackground style
axisitem-textstyle-backgroundFillStyleBackground style
axisitem-textstyle-baselineBaseLineStyleBase line
axisitem-textstyle-colorstringColor in CSS form
axisitem-textstyle-fillFillStyleText fill style
axisitem-textstyle-fontstringFont see
axisitem-textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
axisitem-textstyle-lineheightstring | numberLine height
axisitem-textstyle-multilinebooleanAllow multi-line text
axisitem-textstyle-outlinestringOutline style
axisitem-textstyle-outlineLineStyleOutline style
axisitem-textstyle-overflowwrapOverflowWrapStyleOverflow wrap
axisitem-textstyle-strikethroughstringStrikethrough style
axisitem-textstyle-strikethroughLineStyleStrikethrough style
axisitem-textstyle-textoverflowTextOverflowStyleText overflow
axisitem-textstyle-underlinestringUnderline style
axisitem-textstyle-underlineLineStyleUnderline style
axisitem-textstyle-underlineoffsetstring | numberUnderline offset distance
axisitem-textstyle-whitespaceWhiteSpaceStyleWhite space
axisitem-textstyle-wordbreakWordBreakStyleWord break
axisitem-tickgeneratorTickGeneratorTickGenerator to use in axis
axisitem-tickgenerator-labelstylesTextStyleAn object containing label style for specified grades
axisitem-tickgenerator-taganyTag user can specify info associated with current object
axisitem-tickgenerator-tickstylesLineStyleAn object containing tick styles for specified grades
axisitem-tickpositionTickPositionTick position
axisitem-titleTitleAxis title
axisitem-title-alignmentAnchorTypeAlignment
axisitem-title-marginnumber | stringMargin style
axisitem-title-offsetPointOffset
axisitem-title-offset-xnumberX coordinate
axisitem-title-offset-ynumberY coordinate
axisitem-title-offsetDimensionOffset
axisitem-title-offset-heightnumberHeight of dimension
axisitem-title-offset-widthnumberWidth of dimension or properties
axisitem-title-showellipsisbooleanEnables/disables ellipsis in case if text is too long
axisitem-title-textstringAxis title text
axisitem-title-textstylestringText style
axisitem-title-textstyleTextStyleText style
axisitem-title-visiblebooleanVisibility
axisitem-transformstringAdditional CSS transformation applied to node or 'none'
axisitem-transformTransformationAdditional CSS transformation applied to node or 'none'
axisitem-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
axisitem-visiblebaselinebooleanVisibility of baseline
axisitem-z-indexnumberDefine node z-index
axissizenumberAxis size
axistitlestringAxis title
axisvisiblebooleanAxis visible
boundsRectDefine position of the group in the parent
clippingbooleanEnable clipping, this does not consider the clipstyle, it is related to bounds-clipping
clipstyleClipStyleClipping style
clipstyleGraphicsPathClipping style
colorboxColorBoxTypeColor box attributes
colorbox-independentrangebooleanColorbox independent range
colorbox-linestylestringColorbox outline rectangle linestyle
colorbox-linestyleLineStyleColorbox outline rectangle linestyle
colorbox-sizenumber | stringColorbox area desired size
colorbox-visiblebooleanColorbox visibility
colorboxindependentrangebooleanColorbox independent range
colorboxlinestylestringColorbox line style
colorboxlinestyleLineStyleColorbox line style
colorboxsizenumber | stringColorbox size
colorproviderColorProviderDefault color provider
colorprovider-maxnumber
colorprovider-minnumber
colorprovider-scaleKnownScales
componentsizesComponentSizesTypeSize of components
componentsizes-axisnumberAxis area desired size
componentsizes-colorboxnumber | stringColorbox area desired size
componentsizes-namedcolorsnumber | stringNamed colors desired size
componentsizes-titlenumberTitle area desired size
contentorientationOrientationContent orientation
cssclassstringThe css class name of this node
csscursorstringCSS cursor associated with node
cssstylestringCSS style to be applied to inserted elements
fillstylestringFill style
fillstyleFillStyleFill style
flipbooleanFlip or not
horizontalflipbooleanHorizontal axis goes from right to left
idstring | numberId of the node, its a unique identifier
infinitybooleanMode to render outside the model limits
layoutstyleLayoutStyleLayout style to be used for parent layout
linestylestringLine style
linestyleLineStyleLine style
localtransformTransformationLocal transformation
locationColorBarLocationColor bar location
locationAnnotationLocationColor bar location
marginsnumber | stringIt has properties for specifying the margins for each side
maxnumberData range max value. If not specified then color provider's getMaxValue() is used
minnumberData range min value. If not specified then color provider's getMinValue() is used
modellimitsRectDefine inner model coordinates of the group
namestringName of the node. It is often used for debugging purposes or to simplify queries
namedcolorsNamedColorsTypeNamedcolors options
namedcolors-sizenumber | stringNamed colors desired size
namedcolors-visiblebooleanNamed colors visibility
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
paddingnumber | stringIt has properties for specifying the padding for each side
pickingchildrenbooleanEnable picking children
preciselimitsbooleanEnable keeping the precise limits and calculate only step
rangeRangeTypeData range
range-maxnumberData range max value. If not specified then color provider's getMaxValue() is used
range-minnumberData range min value. If not specified then color provider's getMinValue() is used
scalescrollstrategyScaleScrollStrategyScale scroll strategy
selectablebooleanSelectable node, a boolean to determine if selection should consider this node
taganyCustom information associated with node. It is a user object which can be used by client code to store information or attach an application object to the shape
tickgeneratorTickGeneratorTickgenerator
titleTitleTypeColor bar title
title-itemTextTitle text object instance
title-item-alignmentAnchorTypeAlignment according to the anchor point
title-item-autosizebooleanAutomatically fit shape bounds to text size, default is true Set it to false if you have more than one paragraph inside with different alignment
title-item-axnumberAnchor x position
title-item-aynumberAnchor y position
title-item-clipstyleClipStyleClipping style
title-item-clipstyleGraphicsPathClipping style
title-item-cssclassstringThe css class name of this node
title-item-csscursorstringCSS cursor associated with node
title-item-cssstylestringCSS style to be applied to inserted elements
title-item-ellipsisstringstringString ellipsis that renders if ellipsis is true
title-item-fillstylestringStyle applied on fill
title-item-fillstyleFillStyleStyle applied on fill
title-item-heightnumberShape height
title-item-idstring | numberId of the node, its a unique identifier
title-item-ispointingupbooleanDefines whether the shape is always pointing up
title-item-layoutstyleLayoutStyleLayout style to specify how to lay out shape
title-item-linestylestringStyle applied on outline
title-item-linestyleLineStyleStyle applied on outline
title-item-localtransformTransformationLocal transformation
title-item-marginsnumber | stringIt has properties for specifying the margins for each side
title-item-maxdimensionDimensionMaximum size for rendering
title-item-mindimensionDimensionMinimum size for rendering
title-item-namestringName of the node. It is often used for debugging purposes or to simplify queries
title-item-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
title-item-opacityblendmodeBlendModeNode opacity mode to blend it
title-item-paddingnumber
title-item-paddingstylenumber | stringInner padding style in device coordinates
title-item-preserveaspectratiobooleanPreserve aspect ratio of the anchored shape
title-item-preservereadingorientationbooleanPreserve reading orientation for local transform
title-item-preserverightanglebooleanPreserve right angle for local transformation
title-item-radiusnumberBorder radius in device coordinates
title-item-rotationanglenumberRotation angle at anchor
title-item-scalescrollstrategyScaleScrollStrategyScale scroll strategy
title-item-selectablebooleanSelectable node, a boolean to determine if selection should consider this node
title-item-showellipsisbooleanEllipsis flag
title-item-sizeisindevicespacebooleanIs coordinate in device space
title-item-sizemodeSizeModeText size mode, default value depends on width and height settings
title-item-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
title-item-textstringText to display
title-item-textstylestringTextStyle to display
title-item-textstyleTextStyleTextStyle to display
title-item-texttransformTransformText-transform (uppercase, lowercase, capitalize)
title-item-transformstringAdditional CSS transformation applied to node or 'none'
title-item-transformTransformationAdditional CSS transformation applied to node or 'none'
title-item-useminmaxdimensionsbooleanUse the min max dimensions to limit visual size
title-item-userheightnumberHeight
title-item-userwidthnumberWidth
title-item-visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
title-item-widthnumberShape width
title-item-z-indexnumberDefine node z-index
title-preservereadingorientationbooleanIs preserve reading orientation activated
title-showellipsisbooleanEllipsis flag
title-sizenumberTitle area desired size
title-sizeisindevicespacebooleanSize is in device space
title-textstringTitle text
title-textstylestringTitle textstyle
title-textstyleTextStyleTitle textstyle
title-visiblebooleanTitle visibility
titleitemTextTitle item
titlesizenumberTitle size
titletextstringTitle text
titletextstylestringTitle text style
titletextstyleTextStyleTitle text style
titlevisiblebooleanTitle visible
transformstringAdditional CSS transformation applied to node or 'none'
transformTransformationAdditional CSS transformation applied to node or 'none'
verticalflipbooleanVertical axis goes from bottom to top
viewcachebooleanView cache to cache child nodes
visiblebooleanVisibility of the node, a boolean to determine if the node should be rendered or not
z-indexnumberDefine node z-index

Contents

Constructors

new ColorBar(options)

new ColorBar(options?)

Creates color bar

Parameters

Name Type Description
Optional optionsOptionsoption to create color bar

Overrides

Group.constructor

Methods

addBaseLayer

addBaseLayer(baseLayer): ColorBar

Add baseLayer to container

Parameters

Name Type Description
baseLayerNode | Node[]baseLayer to be added

Returns

ColorBar

this

Inherited from

Group.addBaseLayer


addChild

addChild(node): ColorBar

Add a child node

Parameters

Name Type Description
nodeNode | Iterator<Node> | Node[]the child node to be added

Returns

ColorBar

this

Inherited from

Group.addChild


addCssClass

addCssClass(cssclass): ColorBar

Adds new css class to node

Parameters

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

Returns

ColorBar

this

Inherited from

Group.addCssClass


addInvalidateHandler

addInvalidateHandler(handler): ColorBar

Add invalidate handler

Deprecated

since 4.0, use Node.on instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

ColorBar

this

Inherited from

Group.addInvalidateHandler


addOverlay

addOverlay(overlay): ColorBar

Add overlay to container

Parameters

Name Type Description
overlayNode | Node[]overlay to be added

Returns

ColorBar

this

Inherited from

Group.addOverlay


adjustPosition

adjustPosition(area?, vAlign?, hAlign?): ColorBar

Adjust position of node to specified area

Parameters

Name Type Description
Optional areaRectspecified area. Default to Parent Model Limits
Optional vAlignstringvertical alignment. It can be "top", "bottom", "center". Defaults to "top".
Optional hAlignstringhorizontal alignment It can be "left", "right", "center". Defaults to "left".

Returns

ColorBar

this

Inherited from

Group.adjustPosition


applyOpacity

Protected applyOpacity(context): ColorBar

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

ColorBar

this

Inherited from

Group.applyOpacity


applyResponsiveStyle

Protected applyResponsiveStyle(): void

Apply a responsive style rules it is exists

Returns

void

Inherited from

Group.applyResponsiveStyle


changeBaseLayerOrder

changeBaseLayerOrder(overlay, order, anchor?): ColorBar

Changes the z-order of the baseLayer.

Parameters

Name Type Description
overlayNode
orderNodeOrderposition to be added
Optional anchorNodeanchor node to specify changeOrder with respect to this node

Returns

ColorBar

this

Inherited from

Group.changeBaseLayerOrder


changeChildOrder

changeChildOrder(node, order, anchor?): ColorBar

changes the z-order of the nodes being rendered.

Parameters

Name Type Description
nodeNodeany child added in the Composite node
orderNodeOrderposition to be added
Optional anchorNodeanchor node to specify changeOrder with respect to this node

Returns

ColorBar

this

Inherited from

Group.changeChildOrder


changeOverlayOrder

changeOverlayOrder(overlay, order, anchor?): ColorBar

Changes the z-order of the overlay.

Parameters

Name Type Description
overlayNodechild overlay
orderNodeOrderposition to be added
Optional anchorNodeanchor node to specify changeOrder with respect to this node

Returns

ColorBar

this

Inherited from

Group.changeOverlayOrder


checkCollision

checkCollision(context): boolean

Check culling Returns true if object is inside of renderable area

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

boolean

true if node is collided

Inherited from

Group.checkCollision


clearBaseLayers

clearBaseLayers(disposeBaseLayers?): ColorBar

Remove all child baseLayers from group

Parameters

Name Type Description
Optional disposeBaseLayersbooleanautomatically dispose baseLayers. If it is true then method dispose is called for each baseLayer, false by default

Returns

ColorBar

this

Inherited from

Group.clearBaseLayers


clearCache

clearCache(): ColorBar

Clear cache

Returns

ColorBar

this

Inherited from

Group.clearCache


clearChildren

clearChildren(disposeChildren?): ColorBar

Remove all child nodes from this composite group

Parameters

Name Type Description
Optional disposeChildrenbooleanautomatically dispose children. If it is true then method dispose is called for each child.

Returns

ColorBar

this

Inherited from

Group.clearChildren


clearOverlays

clearOverlays(disposeOverlays?): ColorBar

Remove all child overlays from group

Parameters

Name Type Description
Optional disposeOverlaysbooleanautomatically dispose overlays. If it is true then method dispose is called for each overlay, false by default

Returns

ColorBar

this

Inherited from

Group.clearOverlays


clone

clone(): ColorBar

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

Returns

ColorBar

clone

Overrides

Group.clone


connectStyle

connectStyle(style, type, callback): ColorBar

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

ColorBar

this

Inherited from

Group.connectStyle


copyConstructor

Protected copyConstructor(src, deepCopy?): ColorBar

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
srcGroup<Node>Source to copy from
Optional deepCopybooleandeep copy

Returns

ColorBar

this

Inherited from

Group.copyConstructor


disconnectStyle

disconnectStyle(style, type, callback): ColorBar

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

ColorBar

this

Inherited from

Group.disconnectStyle


dispose

dispose(): void

Dispose node. Clear all listeners and disconnect style to avoid memory leaks

Returns

void

Inherited from

Group.dispose


drawBorder

Protected drawBorder(localContext, bounds?): ColorBar

Draws a rectangle at the bounding box (in parent coordinates)

Parameters

Name Type Description
localContextRenderingContextThe local rendering context
Optional boundsRectgroup bounds

Returns

ColorBar

this

Inherited from

Group.drawBorder


enableClipping

enableClipping(doClip): ColorBar

Enables or disables clipping of this node. If enabled, shapes will not be rendered outside of its bounds.

Parameters

Name Type Description
doClipbooleanenable clipping on this node

Returns

ColorBar

this

Inherited from

Group.enableClipping


enableEventPropagation

enableEventPropagation(enable): ColorBar

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

ColorBar

this

Inherited from

Group.enableEventPropagation


enablePickingChildren

enablePickingChildren(enable): ColorBar

Enables or disables picking children

Parameters

Name Type Description
enablebooleanenable picking children

Returns

ColorBar

this

Inherited from

Group.enablePickingChildren


enumerateNodes

enumerateNodes(callback, target?): void

Executes a provided function once for each child node

Parameters

Name Type Description
callbackCallback<Node>provided function
Optional targetQueryBuilder<any>target to pass to callback as a second parameter

Returns

void

Inherited from

Group.enumerateNodes


execute

execute(delegate): ColorBar

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

Returns

ColorBar

The result if any or this

Inherited from

Group.execute

execute<T>(delegate): T

Type parameters

Name
T

Parameters

Name Type
delegate(this: ColorBar) => T

Returns

T

Inherited from

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

Group.filter


getAnimationStyle

getAnimationStyle(): AnimationStyle

Return animation style

Returns

AnimationStyle

animationStyle current animation style

Inherited from

Group.getAnimationStyle


getAutoModelLimitsMode

getAutoModelLimitsMode(): boolean

Get Model Limits Logics to use when no Model Limits have been set set to true: will use parents width and height, starting at 0 set to false: will use parents bounds

Returns

boolean

mode

Inherited from

Group.getAutoModelLimitsMode


getAutoModelLimitsStrategy

getAutoModelLimitsStrategy(): ModelLimitsStrategy

Get Model Limits Logics Strategy

Returns

ModelLimitsStrategy

strategy

Inherited from

Group.getAutoModelLimitsStrategy


getBaseLayer

getBaseLayer(index): Node

Return baseLayer at specified index

Parameters

Name Type Description
indexnumberindex at which to get the baseLayer for

Returns

Node

track

Inherited from

Group.getBaseLayer


getBaseLayers

getBaseLayers<S>(predicate, modify?): Iterator<Node>

Return iterator by baseLayers nodes

Type parameters

NameType
Sextends Node<S>

Parameters

Name Type Description
predicate(value: Node) => value is Sa filter function
Optional modifybooleanAn option to specify if the iterator supports adding/removing items from the collection. false by default.

Returns

Iterator<Node>

Inherited from

Group.getBaseLayers

getBaseLayers(filter?, modify?): Iterator<Node>

Returns an iterator for child baseLayers. The iterator does not support adding or deleting items from overlays by default. If it is necessary to modify a collection of overlays, pass true as the last parameter.

Example

// Gets a writable iterator
const it = node.getOverlays(null, true);

Parameters

Name Type Description
Optional filter(node: Node) => booleanA filter function. Returns all overlays if null.
Optional modifybooleanAn option to specify if the iterator supports adding/removing items from the collection. false by default.

Returns

Iterator<Node>

An iterator for child overlays.

Inherited from

Group.getBaseLayers


getBaseLayersCount

getBaseLayersCount(): number

Returns amount of baseLayers

Returns

number

Inherited from

Group.getBaseLayersCount


getBounds

getBounds(): Rect

Get the bounds in the parents model space. If bounds are not set, then parent model limits are used.

Returns

Rect

current bounds

Inherited from

Group.getBounds


getCache

getCache(): Cache

Return cache strategy to be used to cache children nodes

Returns

Cache

cache

Inherited from

Group.getCache


getChild

getChild(i): Node

Return node by index

Parameters

Name Type Description
inumberindex of the node

Returns

Node

Inherited from

Group.getChild


getChildren

getChildren<S>(predicate, modify?): Iterator<S>

Return iterator by child nodes

Type parameters

NameType
Sextends Node<S>

Parameters

Name Type Description
predicate(value: Node) => value is Sa filter function
Optional modifybooleanAn option to specify if the iterator supports adding/removing items from the collection. false by default.

Returns

Iterator<S>

Inherited from

Group.getChildren

getChildren(filter?, modify?): Iterator<Node>

Returns an iterator for child nodes. The iterator does not support adding or deleting items from children by default. If it is necessary to modify a collection of children, pass true as the last parameter.

Example

// Gets a writable iterator
const it = node.getChildren(null, true);

Parameters

Name Type Description
Optional filter(node: Node) => booleanA filter function. Returns all nodes if null.
Optional modifybooleanAn option to specify if the iterator supports adding/removing items from the collection. false by default.

Returns

Iterator<Node>

An iterator for child nodes.

Inherited from

Group.getChildren


getChildrenCount

getChildrenCount(): number

Return number of child nodes

Returns

number

Inherited from

Group.getChildrenCount


getClassName

getClassName(): string

Returns

string

Inherited from

Group.getClassName


getClipStyle

getClipStyle(): ClipStyle

Gets the current clipping style

Returns

ClipStyle

clipping style

Inherited from

Group.getClipStyle


getColorProvider

getColorProvider(): ColorProvider

Get current color provider

Returns

ColorProvider


getContentOrientation

getContentOrientation(): Orientation

Return content orientation

Returns

Orientation

content orientation

Inherited from

Group.getContentOrientation


getContentsArea

getContentsArea(transformation?): Rect

Return area without paddings. Model limits are mapped to content area, where children are layout.

Parameters

Name Type Description
Optional transformationTransformationscene transformation

Returns

Rect

Inherited from

Group.getContentsArea


getContentsTransform

getContentsTransform(): Transformation

getContentsTransform() retrieves the world transformation of the node.

Returns

Transformation

transformation from model coordinates to bounds of the group

Inherited from

Group.getContentsTransform


getCss

getCss(): CssStyle

Return CSS style

Returns

CssStyle

Inherited from

Group.getCss


getCssClass

getCssClass(): string

Returns css class name to be used to apply CSS style

Returns

string

the css class name

Inherited from

Group.getCssClass


getCssClasses

getCssClasses(): string[]

Gets list of css class names which applied to this node

Returns

string[]

Inherited from

Group.getCssClasses


getCssTransform

getCssTransform(): string

Returns CSS transformation

Returns

string

Inherited from

Group.getCssTransform


getDesiredHeight

getDesiredHeight(): string | number

Returns desired height of the group as a layoutable object This method is a helper method to get access to getLayoutStyle()

Returns

string | number

desired height ("undefined" by default)

Inherited from

Group.getDesiredHeight


getDesiredWidth

getDesiredWidth(): string | number

Returns desired width of the group as a layoutable object. This method is a helper method to get access to getLayoutStyle()

Returns

string | number

desired width ("undefined" by default)

Inherited from

Group.getDesiredWidth


getDeviceLimits

getDeviceLimits(): Rect

Return device limits

Returns

Rect

Inherited from

Group.getDeviceLimits


getFillStyle

getFillStyle(): FillStyle

Return fill style

Returns

FillStyle

fillStyle current fill style

Inherited from

Group.getFillStyle


getId

getId(): string | number

Returns the associated identifier of the node

Returns

string | number

The node's id

Inherited from

Group.getId


getInfiniteMode

getInfiniteMode(): boolean

Return infinity mode flag

Returns

boolean

flag

Inherited from

Group.getInfiniteMode


getInvalidateMethod

Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>

Gets invalidate method

Returns

AttributeCallback<EventDispatcher>

method to invalidate this object

Inherited from

Group.getInvalidateMethod


getLayout

getLayout(): Layout

Returns layout associated with the group

Returns

Layout

layout

Inherited from

Group.getLayout


getLayoutStyle

getLayoutStyle(): LayoutStyle<string | number>

return desired layout style

Returns

LayoutStyle<string | number>

Inherited from

Group.getLayoutStyle


getLineStyle

getLineStyle(): LineStyle

Return border style

Returns

LineStyle

Inherited from

Group.getLineStyle


getLocalTransform

getLocalTransform(): Transformation

Retrieves the transformation of bounds to parent

Returns

Transformation

transform the local transform.

Inherited from

Group.getLocalTransform


getLocation

getLocation(): ColorBarLocation

Gets the location of the color bar.

Returns

ColorBarLocation


getMarginsStyle

getMarginsStyle(): SpaceStyle<string | number>

Return margins style

Returns

SpaceStyle<string | number>

Inherited from

Group.getMarginsStyle


getMarkerPlotPoint

getMarkerPlotPoint(value): Point

Returns center of color marker for the provided value

Parameters

Name Type Description
valuenumbercolor value

Returns

Point


getMarkerProperies

getMarkerProperies(): OptionsOut

Returns Marker symbols options

Returns

OptionsOut


getModelLimits

getModelLimits(): Rect

Gets model limits, the limits of this groups inside space

Returns

Rect

the current model limits

Inherited from

Group.getModelLimits


getName

getName(): string

Returns the node name

Returns

string

The node name

Inherited from

Group.getName


getOpacity

getOpacity(): number

Returns current node opacity

Returns

number

opacity

Inherited from

Group.getOpacity


getOpacityBlendMode

getOpacityBlendMode(): BlendMode

Returns current node opacity

Returns

BlendMode

opacity blend mode

Inherited from

Group.getOpacityBlendMode


getOptions

getOptions(): Options

Gets color bar options

Returns

Options

options (see setOptions for the JSON-object detailed description)


getOverlay

getOverlay(index): Node

Return overlay at specified index

Parameters

Name Type Description
indexnumberindex at which to get the overlay for

Returns

Node

track

Inherited from

Group.getOverlay


getOverlayAt

getOverlayAt(index): Node

Return overlay at specified index

Deprecated

since 4.2 use getOverlay instead

Parameters

Name Type Description
indexnumberindex at which to get the overlay for

Returns

Node

track

Inherited from

Group.getOverlayAt


getOverlays

getOverlays<S>(predicate, modify?): Iterator<Node>

Return iterator by overlays nodes

Type parameters

NameType
Sextends Node<S>

Parameters

Name Type Description
predicate(value: Node) => value is Sa filter function
Optional modifybooleanAn option to specify if the iterator supports adding/removing items from the collection. false by default.

Returns

Iterator<Node>

Inherited from

Group.getOverlays

getOverlays(filter?, modify?): Iterator<Node>

Returns an iterator for child overlays. The iterator does not support adding or deleting items from overlays by default. If it is necessary to modify a collection of overlays, pass true as the last parameter.

Example

// Gets a writable iterator
const it = node.getOverlays(null, true);

Parameters

Name Type Description
Optional filter(node: Node) => booleanA filter function. Returns all overlays if null.
Optional modifybooleanAn option to specify if the iterator supports adding/removing items from the collection. false by default.

Returns

Iterator<Node>

An iterator for child overlays.

Inherited from

Group.getOverlays


getOverlaysCount

getOverlaysCount(): number

Returns amount of overlays

Returns

number

Inherited from

Group.getOverlaysCount


getPaddingStyle

getPaddingStyle(): SpaceStyle<string | number>

Return padding style

Returns

SpaceStyle<string | number>

padding

Inherited from

Group.getPaddingStyle


getParent

getParent(): Node

Return parent node

Returns

Node

parent node

Inherited from

Group.getParent


getPointAtValue

getPointAtValue(value): number

Gets the offset of value on ColorBar

Parameters

Name Type Description
valuenumbervalue

Returns

number

offset on ColorBar


getPreferredSize

getPreferredSize(): Rect

Return preferred size to layout children

Returns

Rect

Inherited from

Group.getPreferredSize


getProperties

getProperties(): OptionsOut

Gets all the properties pertaining to this object

Returns

OptionsOut

properties

Overrides

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

Group.getProperty


getPropertyKeys

getPropertyKeys(): string[]

Returns known properties keys

Returns

string[]

Inherited from

Group.getPropertyKeys


getRenderingFilter

getRenderingFilter(): IFilter

Return filter to be used for rendering and picking

Returns

IFilter

current filter

Inherited from

Group.getRenderingFilter


getResponsiveStyle

getResponsiveStyle(): ResponsiveStyle

Return responsive style

Returns

ResponsiveStyle

Inherited from

Group.getResponsiveStyle


getRoot

getRoot(): Node

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

Returns

Node

the root node

Inherited from

Group.getRoot


getScaleScrollStrategy

getScaleScrollStrategy(): Delegate

Gets scale scroll strategy

Returns

Delegate

scale scroll strategy

Inherited from

Group.getScaleScrollStrategy


getSceneTransform

getSceneTransform(): Transformation

Returns transformation from node to root scene

Returns

Transformation

a transformation from node to root scene

Inherited from

Group.getSceneTransform


getTag

getTag(): any

Returns the object associated with the node by user.

Returns

any

The node's user-object

Inherited from

Group.getTag


getTickGenerator

getTickGenerator(): TickGenerator

Returns the tick generator of inner axis for manipulations

Returns

TickGenerator


getVisible

getVisible(): boolean

Return visibility of the node

Returns

boolean

true if node is visible

Inherited from

Group.getVisible


getVisibleDeviceLimits

getVisibleDeviceLimits(ignoreModelLimits?): Rect

Return visible device limits

Parameters

Name Type Description
Optional ignoreModelLimitsbooleanflag defines whether to ignore ModelLimits or not

Returns

Rect

Inherited from

Group.getVisibleDeviceLimits


getVisibleModelLimits

getVisibleModelLimits(ignoreModelLimits?): Rect

Return visible model limits

Parameters

Name Type Description
Optional ignoreModelLimitsbooleanflag defines whether to ignore ModelLimits or not

Returns

Rect

Inherited from

Group.getVisibleModelLimits


getWorldTransform

getWorldTransform(): Transformation

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

Returns

Transformation

Inherited from

Group.getWorldTransform


getZIndex

getZIndex(): number

Returns node z-index (null if not set)

Returns

number

Inherited from

Group.getZIndex


hasCssClass

hasCssClass(cssClass): boolean

Check if node has specified css class

Parameters

Name Type Description
cssClassstringcss class name

Returns

boolean

Inherited from

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

Group.hasEventListener


hideMarker

hideMarker(): ColorBar

Hide markers

Returns

ColorBar

this


indexOfBaseLayer

indexOfBaseLayer(baseLayer): number

Return index of overlay ( index of the specified child or -1 if baseLayer is not found)

Parameters

Name Type Description
baseLayerNodebaseLayer to check index

Returns

number

Inherited from

Group.indexOfBaseLayer


indexOfChild

indexOfChild(node): number

Return index of child ( index of the specified child or -1 if node is not found)

Parameters

Name Type Description
nodeNodenode to check index

Returns

number

Inherited from

Group.indexOfChild


indexOfOverlay

indexOfOverlay(overlay): number

Return index of overlay ( index of the specified child or -1 if overlay is not found)

Parameters

Name Type Description
overlayNodeoverlay to check index

Returns

number

Inherited from

Group.indexOfOverlay


insertBaseLayer

insertBaseLayer(index, baseLayer): ColorBar

Insert child baseLayer at specified index

Parameters

Name Type Description
indexnumberspecified index
baseLayerNodea baseLayer to add

Returns

ColorBar

this

Inherited from

Group.insertBaseLayer


insertChild

insertChild(index, node): ColorBar

Insert child node at specified index

Parameters

Name Type Description
indexnumberspecified index
nodeNodea child node to add

Returns

ColorBar

this

Inherited from

Group.insertChild


insertOverlay

insertOverlay(index, overlay): ColorBar

Insert child overlay at specified index

Parameters

Name Type Description
indexnumberspecified index
overlayNodea overlay to add

Returns

ColorBar

this

Inherited from

Group.insertOverlay


invalidate

invalidate(bounds?, force?): ColorBar

Invalidate node

Parameters

Name Type Description
Optional boundsRectoptional rectangular area to be invalidated, or force flag if rectangle is empty
Optional forcebooleanoptional boolean parameter that can force invalidation

Returns

ColorBar

this

Inherited from

Group.invalidate


invalidateLayout

invalidateLayout(propagate?): ColorBar

Notify that layout is invalidated. Send event Events.LayoutInvalidated

Parameters

Name Type Description
Optional propagatebooleanpropagate invalidate layout to parent

Returns

ColorBar

this

Inherited from

Group.invalidateLayout


invalidateParent

invalidateParent(bounds?, force?): ColorBar

Invalidate parent area

Parameters

Name Type Description
Optional boundsRectarea to invalidate
Optional forcebooleanforce

Returns

ColorBar

this

Inherited from

Group.invalidateParent


isClippingEnabled

isClippingEnabled(): boolean

Returns if clipping is enabled or not for this node.

Returns

boolean

Inherited from

Group.isClippingEnabled


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Group.isDisposed


isEventPropagationEnabled

isEventPropagationEnabled(): boolean

Return true if event propagation is enabled from child to parent

Returns

boolean

Inherited from

Group.isEventPropagationEnabled


isHorizontalFlip

isHorizontalFlip(): boolean

Return true if the representation is flipped horizontally

Returns

boolean

flip

Inherited from

Group.isHorizontalFlip


isLayoutInvalidated

isLayoutInvalidated(): boolean

Return true if layout is invalid

Returns

boolean

Inherited from

Group.isLayoutInvalidated


isNotificationEnabled

isNotificationEnabled(): boolean

return state of notification

Returns

boolean

current notification state

Inherited from

Group.isNotificationEnabled


isPickingChildrenEnabled

isPickingChildrenEnabled(): boolean

Returns if picking children is enabled or not for this node.

Returns

boolean

pickingChildren

Inherited from

Group.isPickingChildrenEnabled


isSelectable

isSelectable(): boolean

Returns true if node can be picked/selected.

Returns

boolean

The selectable flag

Inherited from

Group.isSelectable


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

Group.isSilent


isVerticalFlip

isVerticalFlip(): boolean

Return true if the representation is flipped vertically

Returns

boolean

flip

Inherited from

Group.isVerticalFlip


moveTo

moveTo(area, vAlign?, hAlign?): ColorBar

MoveTo position of node to specified area

Parameters

Name Type Description
areaRectspecified area
Optional vAlignstringvertical alignment. It can be "top", "bottom", "center".
Optional hAlignstringhorizontal alignment It can be "left", "right", "center".

Returns

ColorBar

this

Inherited from

Group.moveTo


notify

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

Notify listeners of the Node

Type parameters

NameType
Eextends string

Parameters

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

Returns

ColorBar

this

Overrides

Group.notify


notifyRoot

Protected notifyRoot(event, source, args?): Node

Notify an even to root node

Parameters

Name Type Description
eventstringtype of event
sourceNodesource who called the event
Optional argsanyevent arguments

Returns

Node

this

Inherited from

Group.notifyRoot


off

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

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

Returns

ColorBar

this

Overrides

Group.off


on

on<E>(type, callback): ColorBar

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

Returns

ColorBar

this

Overrides

Group.on


onBoundsChanged

Protected onBoundsChanged(bounds): ColorBar

Occurs when bounds has been changed

Parameters

Name Type Description
boundsRectbound of the node in the parent coordinates

Returns

ColorBar

this

Inherited from

Group.onBoundsChanged


onChildAdded

Protected onChildAdded(child): void

This method is called it child or children are added

Parameters

Name Type Description
childNode | Iterator<Node>added child

Returns

void

Inherited from

Group.onChildAdded


onChildRemoved

Protected onChildRemoved(child): void

This method is called it child or children are removed

Parameters

Name Type Description
childNoderemoved child

Returns

void

Inherited from

Group.onChildRemoved


onParentChanged

Protected onParentChanged(node): ColorBar

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

Parameters

Name Type Description
nodeNodenode to change parent

Returns

ColorBar

this

Inherited from

Group.onParentChanged


onVisibilityChanged

Protected onVisibilityChanged(): void

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

Returns

void

Inherited from

Group.onVisibilityChanged


postRendering

Protected postRendering(context, callback?): void

To be called after rendering, used for PDF output

Parameters

Name Type Description
contextRenderingContextRendering Context
Optional callback() => voidcallback to be called after rendering

Returns

void

Inherited from

Group.postRendering


preRendering

Protected preRendering(context, callback?): void

Occurs before child rendering

Parameters

Name Type Description
contextRenderingContextRendering Context
Optional callback() => voidcallback to be called after rendering of geometry

Returns

void

Inherited from

Group.preRendering


rebuild

rebuild(force?, changes?): ColorBar

Rebuild node. This method resets state, cache, and invalidate node.

Parameters

Name Type Description
Optional forcebooleanoptional boolean parameter that can force invalidation
Optional changesStateChangesoptional parameter to specify a reason of changes

Returns

ColorBar

this

Inherited from

Group.rebuild


registerAnimationStyle

registerAnimationStyle(root): void

Register animation style.

Parameters

Name Type Description
rootNoderoot node for node

Returns

void

Inherited from

Group.registerAnimationStyle


removeBaseLayer

removeBaseLayer(baseLayer): ColorBar

Remove child baseLayer

Parameters

Name Type Description
baseLayerNode | Node[]baseLayer or array of nodes to be removed

Returns

ColorBar

this

Inherited from

Group.removeBaseLayer


removeChild

removeChild(node, disposeChildren?): ColorBar

Remove child node

Parameters

Name Type Description
nodeNode | Node[]node or array of nodes to be removed
Optional disposeChildrenbooleanautomatically dispose children. If it is true then method dispose is called for each child.

Returns

ColorBar

this

Inherited from

Group.removeChild


removeCssClass

removeCssClass(cssclass): ColorBar

Removes css class from node

Parameters

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

Returns

ColorBar

this

Inherited from

Group.removeCssClass


removeInvalidateHandler

removeInvalidateHandler(handler): ColorBar

Remove invalidate handler

Deprecated

since 4.0, use Node.off instead

Parameters

Name Type Description
handlerFunctionhandler to be notified about invalidation

Returns

ColorBar

this

Inherited from

Group.removeInvalidateHandler


removeOverlay

removeOverlay(overlay): ColorBar

Remove child overlay

Parameters

Name Type Description
overlayNode | Node[]overlay or array of nodes to be removed

Returns

ColorBar

this

Inherited from

Group.removeOverlay


render

render(context): void

Render group

Parameters

Name Type Description
contextRenderingContextcontext to render group

Returns

void

Inherited from

Group.render


renderAsync

renderAsync(context, callback): void

Render node in asynchronous mode. This implementation doesn't support cache for now.

Parameters

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

Returns

void

Inherited from

Group.renderAsync


renderBackground

Protected renderBackground(context, bounds): ColorBar

Render background

Parameters

Name Type Description
contextRenderingContextcontext to render background
boundsRectgroup bounds

Returns

ColorBar

this

Inherited from

Group.renderBackground


renderBaseLayers

Protected renderBaseLayers(context): ColorBar

Render baseLayers on bottom of cache. This method does nothing, but can be implemented to render graphics on bottom of cache and between borders

Parameters

Name Type Description
contextRenderingContextcontext to render baseLayers

Returns

ColorBar

this

Inherited from

Group.renderBaseLayers


renderBaseLayersAsync

Protected renderBaseLayersAsync(context, callback): void

Render baseLayers on bottom of cache in asynchronous mode. This method calls renderBaseLayers

Parameters

Name Type Description
contextRenderingContextcontext to render overlays
callback() => voidcallback function

Returns

void

Inherited from

Group.renderBaseLayersAsync


renderChildren

Protected renderChildren(context): void

Render children

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

Group.renderChildren


renderChildrenAsync

Protected renderChildrenAsync(context, callback): void

Render children async

Parameters

Name Type Description
contextRenderingContextRendering Context
callback() => voidcallback function to be called then all children are rendered

Returns

void

Inherited from

Group.renderChildrenAsync


renderContent

Protected renderContent(context): void

render to specified context. This method calls preRendering, renderChildren, postRendering

Parameters

Name Type Description
contextRenderingContextRendering Context

Returns

void

Inherited from

Group.renderContent


renderContentAsync

Protected renderContentAsync(context, callback): void

Render children in asynchronous mode

Parameters

Name Type Description
contextRenderingContextThe rendering context to be used to draw the node
callback() => voidcallback function to be called then all children are rendered

Returns

void

Inherited from

Group.renderContentAsync


renderOverlays

Protected renderOverlays(context): ColorBar

Render overlays on top of cache. This method does nothing, but can be implemented to render graphics on top of cache and between borders

Parameters

Name Type Description
contextRenderingContextcontext to render overlays

Returns

ColorBar

this

Inherited from

Group.renderOverlays


renderOverlaysAsync

Protected renderOverlaysAsync(context, callback): void

Render overlays on top of cache in asynchronous mode. This method calls renderOverlays

Parameters

Name Type Description
contextRenderingContextcontext to render overlays
callback() => voidcallback function

Returns

void

Inherited from

Group.renderOverlaysAsync


resumeUpdate

resumeUpdate(rebuild?, changes?): ColorBar

Resume auto update

Parameters

Name Type Description
Optional rebuildbooleanforce rebuild
Optional changesStateChangesoptional parameter to specify a reason of changes

Returns

ColorBar

this

Inherited from

Group.resumeUpdate


rotate

rotate(theta, x, y): ColorBar

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

ColorBar

this

Inherited from

Group.rotate


scale

scale(xx, yy): ColorBar

Scale node

Parameters

Name Type Description
xxnumberx scale factor
yynumbery scale factor

Returns

ColorBar

this

Inherited from

Group.scale


setAnimationStyle

setAnimationStyle(animationStyle): ColorBar

Sets animation style

Parameters

Name Type Description
animationStyleTypeanimation style

Returns

ColorBar

Inherited from

Group.setAnimationStyle


setAutoModelLimitsMode

setAutoModelLimitsMode(mode): ColorBar

Set Model Limits Logics to use when no Model Limits have been set set to true: will use parents width and height, starting at 0 set to false: will use parents bounds. This is convenient method. It creates AutoModelLimitsStrategy

Parameters

Name Type Description
modebooleanModel Limits Logics to be used

Returns

ColorBar

this

Inherited from

Group.setAutoModelLimitsMode


setAutoModelLimitsStrategy

setAutoModelLimitsStrategy(strategy): ColorBar

Set Model Limits Logics Strategy

Parameters

Name Type Description
strategyModelLimitsStrategyModel Limits logic strategy to use

Returns

ColorBar

this

Inherited from

Group.setAutoModelLimitsStrategy


setBounds

setBounds(bounds): ColorBar

Sets bounds of the node in the parent coordinates

Parameters

Name Type Description
boundsTypebound of the node in the parent coordinates

Returns

ColorBar

this

Inherited from

Group.setBounds


setCache

setCache(cache, rebuild?): ColorBar

Sets cache to be used to cache

Parameters

Name Type Description
cacheCachecache to be used
Optional rebuildbooleanrebuild cache

Returns

ColorBar

this

Inherited from

Group.setCache


setChild

setChild(index, node): ColorBar

Replace child node by index

Parameters

Name Type Description
indexnumberindex of the node
nodeNodenode

Returns

ColorBar

this

Inherited from

Group.setChild


setClipStyle

setClipStyle(style): ColorBar

Sets a new clipping style

Parameters

Name Type Description
styleGraphicsPath | ClipStyle | Optionsa new clipping style

Returns

ColorBar

this

Inherited from

Group.setClipStyle


setContentOrientation

setContentOrientation(orientation): ColorBar

Set content orientation

Parameters

Name Type Description
orientationOrientationcontent orientation

Returns

ColorBar

this

Inherited from

Group.setContentOrientation


setCss

setCss(style, merge?): ColorBar

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

ColorBar

this

Inherited from

Group.setCss


setCssClass

setCssClass(name): ColorBar

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

ColorBar

this

Inherited from

Group.setCssClass


setCssTransform

setCssTransform(transform): ColorBar

Set CSS transformation

Parameters

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

Returns

ColorBar

this

Inherited from

Group.setCssTransform


setDesiredHeight

setDesiredHeight(value, silent?): ColorBar

Sets desired height of the group as a layoutable object

Parameters

Name Type Description
valuestring | numberdesired height to set, use 'auto' for automatic desired height
Optional silentbooleansilent setting

Returns

ColorBar

this

Inherited from

Group.setDesiredHeight


setDesiredWidth

setDesiredWidth(value, silent?): ColorBar

Sets desired width of the group as a layoutable object

Parameters

Name Type Description
valuestring | numberdesired width to set
Optional silentbooleansilent setting

Returns

ColorBar

this

Inherited from

Group.setDesiredWidth


setFillStyle

setFillStyle(fillStyle, merge?): ColorBar

Sets fill style

Parameters

Name Type Description
fillStyleTypea new fill style
Optional mergebooleantrue if you want to merge fillStyle with existing attribute, false by default

Returns

ColorBar

this

Inherited from

Group.setFillStyle


setHorizontalFlip

setHorizontalFlip(enable): ColorBar

Set horizontal flip of the representation

Parameters

Name Type Description
enablebooleanenable flip

Returns

ColorBar

this

Inherited from

Group.setHorizontalFlip


setId

setId(id): ColorBar

Allows the user to associate any identifier

Parameters

Name Type Description
idstring | numberobject id

Returns

ColorBar

this

Inherited from

Group.setId


setInfiniteMode

setInfiniteMode(infinityMode): ColorBar

Set infinity mode flag to draw composite without collision check

Parameters

Name Type Description
infinityModebooleaninfinity mode flag

Returns

ColorBar

this

Inherited from

Group.setInfiniteMode


setLayout

setLayout(layout): ColorBar

Associate layout with a group.

Parameters

Name Type Description
layoutRecord<string, any> | Layoutlayout instance to be set or layout properties to apply

Returns

ColorBar

this

Inherited from

Group.setLayout


setLayoutInvalidated

Protected setLayoutInvalidated(invalidated): void

Set invalidation status

Parameters

Name Type Description
invalidatedbooleaninvalidated layout

Returns

void

Inherited from

Group.setLayoutInvalidated


setLayoutStyle

setLayoutStyle(layoutStyle, silent?, merge?): ColorBar

specify desired layout style

Parameters

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

Returns

ColorBar

this

Inherited from

Group.setLayoutStyle


setLineStyle

setLineStyle(lineStyle, merge?): ColorBar

Sets border color Returns this

Parameters

Name Type Description
lineStyleTypeline style or options
Optional mergebooleantrue if you want to merge lineStyle with existing attribute, false by default

Returns

ColorBar

this

Inherited from

Group.setLineStyle


setLocalTransform

setLocalTransform(localTransform, force?): ColorBar

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

ColorBar

this

Inherited from

Group.setLocalTransform


setMarginsStyle

setMarginsStyle(margins, merge?): ColorBar

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

ColorBar

this

Inherited from

Group.setMarginsStyle


setMarkerPosition

setMarkerPosition(position): ColorBar

Set marker position

Parameters

Name Type Description
positionMarkerPositionmarker position

Returns

ColorBar

this


setMarkerProperies

setMarkerProperies(properties): ColorBar

Set marker symbol properties

Parameters

Name Type Description
propertiesOptionsmarker symbol properties

Returns

ColorBar


setModelLimits

setModelLimits(limits): ColorBar

Sets inner model limits

Parameters

Name Type Description
limitsTypeinner limits

Returns

ColorBar

this

Inherited from

Group.setModelLimits


setName

setName(name): ColorBar

Sets name of the node

Parameters

Name Type Description
namestringThe node name

Returns

ColorBar

this

Inherited from

Group.setName


setNotification

setNotification(notify, force?): ColorBar

set notification state

Parameters

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

Returns

ColorBar

this

Inherited from

Group.setNotification


setOpacity

setOpacity(opacity, blendMode?): ColorBar

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

ColorBar

this

Inherited from

Group.setOpacity


setOptions

setOptions(options?): ColorBar

Sets color bar options

Parameters

Name Type Description
Optional optionsOptionscolorbar options

Returns

ColorBar

this


setPaddingStyle

setPaddingStyle(paddingStyle, merge?): ColorBar

Sets padding style

Parameters

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

Returns

ColorBar

this

Inherited from

Group.setPaddingStyle


setProperties

setProperties(properties?): ColorBar

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsproperties

Returns

ColorBar

this

Overrides

Group.setProperties


setProperty

setProperty(name, value): ColorBar

Sets dynamic property by name

Parameters

Name Type Description
namestringproperty name
valueanyproperty value

Returns

ColorBar

this

Inherited from

Group.setProperty


setRenderingFilter

setRenderingFilter(filter): ColorBar

Sets filter to be applied before rendering and picking

Parameters

Name Type Description
filterIFilterfilter to set

Returns

ColorBar

this

Inherited from

Group.setRenderingFilter


setResponsiveStyle

setResponsiveStyle(style): ColorBar

Sets responsive style.

Parameters

Name Type Description
styleOptions | ResponsiveStyleresponsive style

Returns

ColorBar

this

Inherited from

Group.setResponsiveStyle


setScaleScrollStrategy

setScaleScrollStrategy(strategy?): ColorBar

Sets scale scroll strategy

Parameters

Name Type Description
Optional strategyDelegatescale scroll strategy

Returns

ColorBar

this

Inherited from

Group.setScaleScrollStrategy


setSelectable

setSelectable(selectable): ColorBar

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

ColorBar

this

Inherited from

Group.setSelectable


setSilent

setSilent(bool): ColorBar

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

ColorBar

this

Inherited from

Group.setSilent


setTag

setTag(tag): ColorBar

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

Parameters

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

Returns

ColorBar

this

Inherited from

Group.setTag


setTickGenerator

setTickGenerator(tickGenerator): ColorBar

Set tick generator

Parameters

Name Type Description
tickGeneratorTickGenerator | Optionstick generator

Returns

ColorBar

this


setVerticalFlip

setVerticalFlip(flip): ColorBar

Set vertical flip of the representation

Parameters

Name Type Description
flipbooleanflag to set the vertical flip of the representation

Returns

ColorBar

this

Inherited from

Group.setVerticalFlip


setVisible

setVisible(value): ColorBar

Sets visibility of the node. Send event Events.VisibilityChanged

Parameters

Name Type Description
valuebooleanflag specifying visibility of the node

Returns

ColorBar

this

Inherited from

Group.setVisible


setVisibleModelLimits

setVisibleModelLimits(visibleModelBounds, deviceBounds?): ColorBar

Set visible model limits

Parameters

Name Type Description
visibleModelBoundsRectvisible model limits or bounds
Optional deviceBoundsRectdevice bounds

Returns

ColorBar

this

Inherited from

Group.setVisibleModelLimits


setZIndex

setZIndex(value): ColorBar

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

Parameters

Name Type Description
valuenumberindex determining node z-position

Returns

ColorBar

this

Inherited from

Group.setZIndex


shear

shear(shx, shy): ColorBar

Shear this node's bounds

Parameters

Name Type Description
shxnumberx-axis shear
shynumbery-axis shear

Returns

ColorBar

this

Inherited from

Group.shear


showMarker

showMarker(value): ColorBar

Show markers near by color-bar color position

Parameters

Name Type Description
valuenumbermarker color value to calculate marker position

Returns

ColorBar

this


suspendUpdate

suspendUpdate(): ColorBar

Suspend auto update

Returns

ColorBar

this

Inherited from

Group.suspendUpdate


toString

toString(): string

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

Returns

string

A string representation

Inherited from

Group.toString


translate

translate(tx, ty): ColorBar

Translate bounds

Parameters

Name Type Description
txnumberx translation
tynumbery translation

Returns

ColorBar

this

Inherited from

Group.translate


unregisterAnimationStyle

unregisterAnimationStyle(root): void

Unregister animation style.

Parameters

Name Type Description
rootAnimatedNoderoot node for node

Returns

void

Inherited from

Group.unregisterAnimationStyle


updateLayout

updateLayout(targets?): ColorBar

Updates layout

Parameters

Name Type Description
Optional targetsILayoutable[]optional parameter about which element to layout

Returns

ColorBar

this

Overrides

Group.updateLayout


updateSceneTransformation

updateSceneTransformation(): ColorBar

Update scene transformation

Returns

ColorBar

this

Inherited from

Group.updateSceneTransformation


updateState

updateState(regions?, changes?): ColorBar

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

ColorBar

this

Inherited from

Group.updateState


updateSuspended

updateSuspended(): boolean

Return state of suspend state

Returns

boolean

state of update

Inherited from

Group.updateSuspended


updateTimeStamp

Protected updateTimeStamp(): ColorBar

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

Returns

ColorBar

this

Inherited from

Group.updateTimeStamp


enableSceneGraphNotification

Static enableSceneGraphNotification(enabled): void

Enable / disable all notifications

Parameters

Name Type Description
enabledbooleansets if this object sends notifications

Returns

void

Inherited from

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

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

Group.findParent


getClassName

Static getClassName(): string

Returns

string

Inherited from

Group.getClassName


isSceneGraphNotificationEnabled

Static isSceneGraphNotificationEnabled(): boolean

Return status of the global notification for all nodes.

Returns

boolean

Inherited from

Group.isSceneGraphNotificationEnabled