API / geotoolkit / controls / 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.
↳
ColorBar
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
automodellimitsmode | boolean | Auto model limits mode |
axisautolabelrotation | boolean | Axis auto label rotation |
axisautolabelrotationangle | number | Axis auto label rotation angle |
axisbaselinestyle | string | Axis baseline style |
axisbaselinestyle | LineStyle | Axis baseline style |
axisbaselinestyle-color | string | Color in CSS form |
axisbaselinestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
axisbaselinestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
axisbaselinestyle-fill-color | string | Color in CSS form |
axisbaselinestyle-fill-evenoddmode | boolean | Even-odd fill mode |
axisbaselinestyle-fill-fillpattern | Pattern | Pattern |
axisbaselinestyle-fill-fillpattern-containername | string | An 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-patternname | string | Name of this pattern for indexing |
axisbaselinestyle-fill-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
axisbaselinestyle-fill-foreground | string | Foreground color |
axisbaselinestyle-fill-pattern | Pattern | Pattern |
axisbaselinestyle-linecap | CapStyle | The line cap style |
axisbaselinestyle-linedashoffset | number | Line dash offset of dashed line |
axisbaselinestyle-linejoin | JoinStyle | The line join style |
axisbaselinestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
axisbaselinestyle-scalable | boolean | True if width should depend on transformation |
axisbaselinestyle-unit | string | Optional unit for the width |
axisbaselinestyle-width | number | string | The line thickness |
axisbaselinevisible | boolean | Axis baseline visibility |
axisitem | Axis | Axis item |
axisitem-autolabelrotation | boolean | Automatic label rotation |
axisitem-autolabelrotationangle | number | |
axisitem-baselinestyle | string | Base line style |
axisitem-baselinestyle | LineStyle | Base line style |
axisitem-bounds | Rect | Axis bounds |
axisitem-bounds-height | number | Height |
axisitem-bounds-readonly | boolean | Readonly |
axisitem-bounds-width | number | Width |
axisitem-bounds-x | number | Left |
axisitem-bounds-y | number | Top |
axisitem-clipstyle | ClipStyle | Clipping style |
axisitem-clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
axisitem-clipstyle-geometry | GraphicsPath | Clipping geometry |
axisitem-clipstyle-geometry-bounds | Rect | Bounds |
axisitem-clipstyle | GraphicsPath | Clipping style |
axisitem-cssclass | string | The css class name of this node |
axisitem-csscursor | string | CSS cursor associated with node |
axisitem-cssstyle | string | CSS style to be applied to inserted elements |
axisitem-dimension | AxisMappingDimension | Axis dimension to setup axis limits |
axisitem-dimension-desiredmodelstep | number | Desired model step |
axisitem-dimension-logarithmic | boolean | True for logarithmic axis |
axisitem-dimension-max | number | Maximum value |
axisitem-dimension-min | number | Minimum value |
axisitem-dimension-minspan | number | Desired minimum distance between ticks in pixels |
axisitem-dimension-name | string | Name of the dimension |
axisitem-dimension-neatlimits | boolean | Enable or disable neat limits |
axisitem-dimension-orientation | Orientation | Axis orientation |
axisitem-dimension-origin | number | |
axisitem-dimension-preciselimits | boolean | Enable keeping the precise limits and calculate only step |
axisitem-dimension-spacing | number | Desired model spacing |
axisitem-fillstyle | string | Style applied on fill |
axisitem-fillstyle | FillStyle | Style applied on fill |
axisitem-hideoverlappedtext | boolean | Hide overlapped text flag |
axisitem-id | string | number | Id of the node, its a unique identifier |
axisitem-infinity | boolean | Infinity mode |
axisitem-labelmanualsettings | boolean | Enable / disable manual settings for labels like anchor |
axisitem-labeloffset | number | Offset the label offset |
axisitem-labelpadding | number | Label padding size in pixels |
axisitem-labelposition | LabelPosition | Label position |
axisitem-layoutstyle | LayoutStyle | Desired layout style |
axisitem-layoutstyle-constraint | SizeConstraint | Layout constrains |
axisitem-layoutstyle-flexgrow | number | Number specifying how much the item will grow relative to the rest of the items inside the same container |
axisitem-layoutstyle-flexshrink | number | Number specifying how much the item will shrink relative to the rest of the items inside the same container |
axisitem-layoutstyle-float | string | Float position |
axisitem-layoutstyle-position | string | Layout position |
axisitem-layoutstyle-size | number | string | Layout size |
axisitem-linestyle | string | Style applied on outline |
axisitem-linestyle | LineStyle | Style applied on outline |
axisitem-localtransform | Transformation | Local transformation |
axisitem-localtransform-dx | number | X axis translation |
axisitem-localtransform-dy | number | Y axis translation |
axisitem-localtransform-xx | number | X scale |
axisitem-localtransform-xy | number | Xy skew |
axisitem-localtransform-yx | number | Yx skew |
axisitem-localtransform-yy | number | Y scale |
axisitem-margins | number | string | It has properties for specifying the margins for each side |
axisitem-maximumlabelsize | number | Maximum label size (in device), text will be wrapped, if it is bigger than maximum label size |
axisitem-modellimits | Rect | Rectangle where to generate ticks |
axisitem-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
axisitem-opacity | number | Node 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-opacityblendmode | BlendMode | Node opacity mode to blend it |
axisitem-orientation | Orientation | Axis orientation |
axisitem-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
axisitem-scalescrollstrategy-enabled | boolean | Enable flag |
axisitem-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
axisitem-tag | any | Custom 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-textstyle | string | Labels textstyle |
axisitem-textstyle | TextStyle | Labels textstyle |
axisitem-textstyle-alignment | AlignmentStyle | Alignment |
axisitem-textstyle-autosize | boolean | Auto font size on high definition display |
axisitem-textstyle-background | string | Background style |
axisitem-textstyle-background | FillStyle | Background style |
axisitem-textstyle-baseline | BaseLineStyle | Base line |
axisitem-textstyle-color | string | Color in CSS form |
axisitem-textstyle-fill | FillStyle | Text fill style |
axisitem-textstyle-font | string | Font see |
axisitem-textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
axisitem-textstyle-lineheight | string | number | Line height |
axisitem-textstyle-multiline | boolean | Allow multi-line text |
axisitem-textstyle-outline | string | Outline style |
axisitem-textstyle-outline | LineStyle | Outline style |
axisitem-textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
axisitem-textstyle-strikethrough | string | Strikethrough style |
axisitem-textstyle-strikethrough | LineStyle | Strikethrough style |
axisitem-textstyle-textoverflow | TextOverflowStyle | Text overflow |
axisitem-textstyle-underline | string | Underline style |
axisitem-textstyle-underline | LineStyle | Underline style |
axisitem-textstyle-underlineoffset | string | number | Underline offset distance |
axisitem-textstyle-whitespace | WhiteSpaceStyle | White space |
axisitem-textstyle-wordbreak | WordBreakStyle | Word break |
axisitem-tickgenerator | TickGenerator | TickGenerator to use in axis |
axisitem-tickgenerator-labelstyles | TextStyle | An object containing label style for specified grades |
axisitem-tickgenerator-tag | any | Tag user can specify info associated with current object |
axisitem-tickgenerator-tickstyles | LineStyle | An object containing tick styles for specified grades |
axisitem-tickposition | TickPosition | Tick position |
axisitem-title | Title | Axis title |
axisitem-title-alignment | AnchorType | Alignment |
axisitem-title-margin | number | string | Margin style |
axisitem-title-offset | Point | Offset |
axisitem-title-offset-x | number | X coordinate |
axisitem-title-offset-y | number | Y coordinate |
axisitem-title-offset | Dimension | Offset |
axisitem-title-offset-height | number | Height of dimension |
axisitem-title-offset-width | number | Width of dimension or properties |
axisitem-title-showellipsis | boolean | Enables/disables ellipsis in case if text is too long |
axisitem-title-text | string | Axis title text |
axisitem-title-textstyle | string | Text style |
axisitem-title-textstyle | TextStyle | Text style |
axisitem-title-visible | boolean | Visibility |
axisitem-transform | string | Additional CSS transformation applied to node or 'none' |
axisitem-transform | Transformation | Additional CSS transformation applied to node or 'none' |
axisitem-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
axisitem-visiblebaseline | boolean | Visibility of baseline |
axisitem-z-index | number | Define node z-index |
axissize | number | Axis size |
axistitle | string | Axis title |
axisvisible | boolean | Axis visible |
bounds | Rect | Define position of the group in the parent |
clipping | boolean | Enable clipping, this does not consider the clipstyle, it is related to bounds-clipping |
clipstyle | ClipStyle | Clipping style |
clipstyle | GraphicsPath | Clipping style |
colorbox | ColorBoxType | Color box attributes |
colorbox-independentrange | boolean | Colorbox independent range |
colorbox-linestyle | string | Colorbox outline rectangle linestyle |
colorbox-linestyle | LineStyle | Colorbox outline rectangle linestyle |
colorbox-size | number | string | Colorbox area desired size |
colorbox-visible | boolean | Colorbox visibility |
colorboxindependentrange | boolean | Colorbox independent range |
colorboxlinestyle | string | Colorbox line style |
colorboxlinestyle | LineStyle | Colorbox line style |
colorboxsize | number | string | Colorbox size |
colorprovider | ColorProvider | Default color provider |
colorprovider-max | number | |
colorprovider-min | number | |
colorprovider-scale | KnownScales | |
componentsizes | ComponentSizesType | Size of components |
componentsizes-axis | number | Axis area desired size |
componentsizes-colorbox | number | string | Colorbox area desired size |
componentsizes-namedcolors | number | string | Named colors desired size |
componentsizes-title | number | Title area desired size |
contentorientation | Orientation | Content orientation |
cssclass | string | The css class name of this node |
csscursor | string | CSS cursor associated with node |
cssstyle | string | CSS style to be applied to inserted elements |
fillstyle | string | Fill style |
fillstyle | FillStyle | Fill style |
flip | boolean | Flip or not |
horizontalflip | boolean | Horizontal axis goes from right to left |
id | string | number | Id of the node, its a unique identifier |
infinity | boolean | Mode to render outside the model limits |
layoutstyle | LayoutStyle | Layout style to be used for parent layout |
linestyle | string | Line style |
linestyle | LineStyle | Line style |
localtransform | Transformation | Local transformation |
location | ColorBarLocation | Color bar location |
location | AnnotationLocation | Color bar location |
margins | number | string | It has properties for specifying the margins for each side |
max | number | Data range max value. If not specified then color provider's getMaxValue() is used |
min | number | Data range min value. If not specified then color provider's getMinValue() is used |
modellimits | Rect | Define inner model coordinates of the group |
name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
namedcolors | NamedColorsType | Namedcolors options |
namedcolors-size | number | string | Named colors desired size |
namedcolors-visible | boolean | Named colors visibility |
opacity | number | Node opacity (from 0 to 1). If it is undefined or null it inherits property from the parent. It changes globalAlpha on the rendering context |
opacityblendmode | BlendMode | Node opacity mode to blend it |
padding | number | string | It has properties for specifying the padding for each side |
pickingchildren | boolean | Enable picking children |
preciselimits | boolean | Enable keeping the precise limits and calculate only step |
range | RangeType | Data range |
range-max | number | Data range max value. If not specified then color provider's getMaxValue() is used |
range-min | number | Data range min value. If not specified then color provider's getMinValue() is used |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
tag | any | Custom 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 |
tickgenerator | TickGenerator | Tickgenerator |
title | TitleType | Color bar title |
title-item | Text | Title text object instance |
title-item-alignment | AnchorType | Alignment according to the anchor point |
title-item-autosize | boolean | Automatically 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-ax | number | Anchor x position |
title-item-ay | number | Anchor y position |
title-item-clipstyle | ClipStyle | Clipping style |
title-item-clipstyle | GraphicsPath | Clipping style |
title-item-cssclass | string | The css class name of this node |
title-item-csscursor | string | CSS cursor associated with node |
title-item-cssstyle | string | CSS style to be applied to inserted elements |
title-item-ellipsisstring | string | String ellipsis that renders if ellipsis is true |
title-item-fillstyle | string | Style applied on fill |
title-item-fillstyle | FillStyle | Style applied on fill |
title-item-height | number | Shape height |
title-item-id | string | number | Id of the node, its a unique identifier |
title-item-ispointingup | boolean | Defines whether the shape is always pointing up |
title-item-layoutstyle | LayoutStyle | Layout style to specify how to lay out shape |
title-item-linestyle | string | Style applied on outline |
title-item-linestyle | LineStyle | Style applied on outline |
title-item-localtransform | Transformation | Local transformation |
title-item-margins | number | string | It has properties for specifying the margins for each side |
title-item-maxdimension | Dimension | Maximum size for rendering |
title-item-mindimension | Dimension | Minimum size for rendering |
title-item-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
title-item-opacity | number | Node 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-opacityblendmode | BlendMode | Node opacity mode to blend it |
title-item-padding | number | |
title-item-paddingstyle | number | string | Inner padding style in device coordinates |
title-item-preserveaspectratio | boolean | Preserve aspect ratio of the anchored shape |
title-item-preservereadingorientation | boolean | Preserve reading orientation for local transform |
title-item-preserverightangle | boolean | Preserve right angle for local transformation |
title-item-radius | number | Border radius in device coordinates |
title-item-rotationangle | number | Rotation angle at anchor |
title-item-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
title-item-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
title-item-showellipsis | boolean | Ellipsis flag |
title-item-sizeisindevicespace | boolean | Is coordinate in device space |
title-item-sizemode | SizeMode | Text size mode, default value depends on width and height settings |
title-item-tag | any | Custom 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-text | string | Text to display |
title-item-textstyle | string | TextStyle to display |
title-item-textstyle | TextStyle | TextStyle to display |
title-item-texttransform | Transform | Text-transform (uppercase, lowercase, capitalize) |
title-item-transform | string | Additional CSS transformation applied to node or 'none' |
title-item-transform | Transformation | Additional CSS transformation applied to node or 'none' |
title-item-useminmaxdimensions | boolean | Use the min max dimensions to limit visual size |
title-item-userheight | number | Height |
title-item-userwidth | number | Width |
title-item-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
title-item-width | number | Shape width |
title-item-z-index | number | Define node z-index |
title-preservereadingorientation | boolean | Is preserve reading orientation activated |
title-showellipsis | boolean | Ellipsis flag |
title-size | number | Title area desired size |
title-sizeisindevicespace | boolean | Size is in device space |
title-text | string | Title text |
title-textstyle | string | Title textstyle |
title-textstyle | TextStyle | Title textstyle |
title-visible | boolean | Title visibility |
titleitem | Text | Title item |
titlesize | number | Title size |
titletext | string | Title text |
titletextstyle | string | Title text style |
titletextstyle | TextStyle | Title text style |
titlevisible | boolean | Title visible |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
verticalflip | boolean | Vertical axis goes from bottom to top |
viewcache | boolean | View cache to cache child nodes |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
z-index | number | Define node z-index |
Constructors
• new ColorBar(options?)
Creates color bar
| Name | Type | Description |
|---|---|---|
Optional options | Options | option to create color bar |
Group.constructor
Methods
▸ addBaseLayer(baseLayer): ColorBar
Add baseLayer to container
this
▸ addChild(node): ColorBar
Add a child node
this
▸ addCssClass(cssclass): ColorBar
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): ColorBar
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ addOverlay(overlay): ColorBar
Add overlay to container
this
▸ adjustPosition(area?, vAlign?, hAlign?): ColorBar
Adjust position of node to specified area
| Name | Type | Description |
|---|---|---|
Optional area | Rect | specified area. Default to Parent Model Limits |
Optional vAlign | string | vertical alignment. It can be "top", "bottom", "center". Defaults to "top". |
Optional hAlign | string | horizontal alignment It can be "left", "right", "center". Defaults to "left". |
this
▸ 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
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
this
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
▸ changeBaseLayerOrder(overlay, order, anchor?): ColorBar
Changes the z-order of the baseLayer.
| Name | Type | Description |
|---|---|---|
overlay | Node | |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
▸ changeChildOrder(node, order, anchor?): ColorBar
changes the z-order of the nodes being rendered.
| Name | Type | Description |
|---|---|---|
node | Node | any child added in the Composite node |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
▸ changeOverlayOrder(overlay, order, anchor?): ColorBar
Changes the z-order of the overlay.
| Name | Type | Description |
|---|---|---|
overlay | Node | child overlay |
order | NodeOrder | position to be added |
Optional anchor | Node | anchor node to specify changeOrder with respect to this node |
this
▸ checkCollision(context): boolean
Check culling Returns true if object is inside of renderable area
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if node is collided
▸ clearBaseLayers(disposeBaseLayers?): ColorBar
Remove all child baseLayers from group
| Name | Type | Description |
|---|---|---|
Optional disposeBaseLayers | boolean | automatically dispose baseLayers. If it is true then method dispose is called for each baseLayer, false by default |
this
▸ clearCache(): ColorBar
Clear cache
this
▸ clearChildren(disposeChildren?): ColorBar
Remove all child nodes from this composite group
| Name | Type | Description |
|---|---|---|
Optional disposeChildren | boolean | automatically dispose children. If it is true then method dispose is called for each child. |
this
▸ clearOverlays(disposeOverlays?): ColorBar
Remove all child overlays from group
| Name | Type | Description |
|---|---|---|
Optional disposeOverlays | boolean | automatically dispose overlays. If it is true then method dispose is called for each overlay, false by default |
this
▸ clone(): ColorBar
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ 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
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ 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.
this
▸ disconnectStyle(style, type, callback): ColorBar
Disconnect style
This convenience method un-subscribes a listener to given style for the specified type.
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ dispose(): void
Dispose node. Clear all listeners and disconnect style to avoid memory leaks
void
▸ Protected drawBorder(localContext, bounds?): ColorBar
Draws a rectangle at the bounding box (in parent coordinates)
| Name | Type | Description |
|---|---|---|
localContext | RenderingContext | The local rendering context |
Optional bounds | Rect | group bounds |
this
▸ enableClipping(doClip): ColorBar
Enables or disables clipping of this node. If enabled, shapes will not be rendered outside of its bounds.
| Name | Type | Description |
|---|---|---|
doClip | boolean | enable clipping on this node |
this
▸ 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();| Name | Type | Description |
|---|---|---|
enable | boolean | enable |
this
▸ enablePickingChildren(enable): ColorBar
Enables or disables picking children
| Name | Type | Description |
|---|---|---|
enable | boolean | enable picking children |
this
▸ enumerateNodes(callback, target?): void
Executes a provided function once for each child node
| Name | Type | Description |
|---|---|---|
callback | Callback<Node> | provided function |
Optional target | QueryBuilder<any> | target to pass to callback as a second parameter |
void
▸ 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");
});| Name | Type | Description |
|---|---|---|
delegate | (this: ColorBar) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: ColorBar) => T |
T
▸ Protected filter(context): boolean
Filter node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
flag filter flag ("true" to render node; "false" otherwise)
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ 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
boolean
mode
▸ getAutoModelLimitsStrategy(): ModelLimitsStrategy
Get Model Limits Logics Strategy
strategy
Group.getAutoModelLimitsStrategy
▸ getBaseLayer(index): Node
Return baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the baseLayer for |
track
▸ getBaseLayers<S>(predicate, modify?): Iterator<Node>
Return iterator by baseLayers nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ 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);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all overlays if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child overlays.
▸ getBaseLayersCount(): number
Returns amount of baseLayers
number
▸ getBounds(): Rect
Get the bounds in the parents model space. If bounds are not set, then parent model limits are used.
current bounds
▸ getCache(): Cache
Return cache strategy to be used to cache children nodes
cache
▸ getChild(i): Node
Return node by index
| Name | Type | Description |
|---|---|---|
i | number | index of the node |
▸ getChildren<S>(predicate, modify?): Iterator<S>
Return iterator by child nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
Iterator<S>
▸ 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);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all nodes if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child nodes.
▸ getChildrenCount(): number
Return number of child nodes
number
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getColorProvider(): ColorProvider
Get current color provider
▸ getContentOrientation(): Orientation
Return content orientation
content orientation
▸ getContentsArea(transformation?): Rect
Return area without paddings. Model limits are mapped to content area, where children are layout.
| Name | Type | Description |
|---|---|---|
Optional transformation | Transformation | scene transformation |
▸ getContentsTransform(): Transformation
getContentsTransform() retrieves the world transformation of the node.
transformation from model coordinates to bounds of the group
▸ getCss(): CssStyle
Return CSS style
▸ getCssClass(): string
Returns css class name to be used to apply CSS style
string
the css class name
▸ getCssClasses(): string[]
Gets list of css class names which applied to this node
string[]
▸ getCssTransform(): string
Returns CSS transformation
string
▸ getDesiredHeight(): string | number
Returns desired height of the group as a layoutable object This method is a helper method to get access to getLayoutStyle()
string | number
desired height ("undefined" by default)
▸ getDesiredWidth(): string | number
Returns desired width of the group as a layoutable object. This method is a helper method to get access to getLayoutStyle()
string | number
desired width ("undefined" by default)
▸ getDeviceLimits(): Rect
Return device limits
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getInfiniteMode(): boolean
Return infinity mode flag
boolean
flag
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getLayout(): Layout
Returns layout associated with the group
layout
▸ getLayoutStyle(): LayoutStyle<string | number>
return desired layout style
LayoutStyle<string | number>
▸ getLineStyle(): LineStyle
Return border style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getLocation(): ColorBarLocation
Gets the location of the color bar.
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getMarkerPlotPoint(value): Point
Returns center of color marker for the provided value
| Name | Type | Description |
|---|---|---|
value | number | color value |
▸ getMarkerProperies(): OptionsOut
Returns Marker symbols options
▸ getModelLimits(): Rect
Gets model limits, the limits of this groups inside space
the current model limits
▸ getName(): string
Returns the node name
string
The node name
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
▸ getOptions(): Options
Gets color bar options
options (see setOptions for the JSON-object detailed description)
▸ getOverlay(index): Node
Return overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the overlay for |
track
▸ getOverlayAt(index): Node
Return overlay at specified index
Deprecated
since 4.2 use getOverlay instead
| Name | Type | Description |
|---|---|---|
index | number | index at which to get the overlay for |
track
▸ getOverlays<S>(predicate, modify?): Iterator<Node>
Return iterator by overlays nodes
| Name | Type |
|---|---|
S | extends Node<S> |
| Name | Type | Description |
|---|---|---|
predicate | (value: Node) => value is S | a filter function |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
▸ 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);| Name | Type | Description |
|---|---|---|
Optional filter | (node: Node) => boolean | A filter function. Returns all overlays if null. |
Optional modify | boolean | An option to specify if the iterator supports adding/removing items from the collection. false by default. |
An iterator for child overlays.
▸ getOverlaysCount(): number
Returns amount of overlays
number
▸ getPaddingStyle(): SpaceStyle<string | number>
Return padding style
SpaceStyle<string | number>
padding
▸ getParent(): Node
Return parent node
parent node
▸ getPointAtValue(value): number
Gets the offset of value on ColorBar
| Name | Type | Description |
|---|---|---|
value | number | value |
number
offset on ColorBar
▸ getPreferredSize(): Rect
Return preferred size to layout children
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties
▸ getProperty(name): any
Gets dynamic property by name. These properties can be used as a property bags
| Name | Type | Description |
|---|---|---|
name | string | property name |
any
▸ getPropertyKeys(): string[]
Returns known properties keys
string[]
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTickGenerator(): TickGenerator
Returns the tick generator of inner axis for manipulations
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getVisibleDeviceLimits(ignoreModelLimits?): Rect
Return visible device limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
▸ getVisibleModelLimits(ignoreModelLimits?): Rect
Return visible model limits
| Name | Type | Description |
|---|---|---|
Optional ignoreModelLimits | boolean | flag defines whether to ignore ModelLimits or not |
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
▸ getZIndex(): number
Returns node z-index (null if not set)
number
▸ hasCssClass(cssClass): boolean
Check if node has specified css class
| Name | Type | Description |
|---|---|---|
cssClass | string | css class name |
boolean
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
▸ hideMarker(): ColorBar
Hide markers
this
▸ indexOfBaseLayer(baseLayer): number
Return index of overlay ( index of the specified child or -1 if baseLayer is not found)
| Name | Type | Description |
|---|---|---|
baseLayer | Node | baseLayer to check index |
number
▸ indexOfChild(node): number
Return index of child ( index of the specified child or -1 if node is not found)
| Name | Type | Description |
|---|---|---|
node | Node | node to check index |
number
▸ indexOfOverlay(overlay): number
Return index of overlay ( index of the specified child or -1 if overlay is not found)
| Name | Type | Description |
|---|---|---|
overlay | Node | overlay to check index |
number
▸ insertBaseLayer(index, baseLayer): ColorBar
Insert child baseLayer at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
baseLayer | Node | a baseLayer to add |
this
▸ insertChild(index, node): ColorBar
Insert child node at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
node | Node | a child node to add |
this
▸ insertOverlay(index, overlay): ColorBar
Insert child overlay at specified index
| Name | Type | Description |
|---|---|---|
index | number | specified index |
overlay | Node | a overlay to add |
this
▸ invalidate(bounds?, force?): ColorBar
Invalidate node
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | optional rectangular area to be invalidated, or force flag if rectangle is empty |
Optional force | boolean | optional boolean parameter that can force invalidation |
this
▸ invalidateLayout(propagate?): ColorBar
Notify that layout is invalidated. Send event Events.LayoutInvalidated
| Name | Type | Description |
|---|---|---|
Optional propagate | boolean | propagate invalidate layout to parent |
this
▸ invalidateParent(bounds?, force?): ColorBar
Invalidate parent area
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | area to invalidate |
Optional force | boolean | force |
this
▸ isClippingEnabled(): boolean
Returns if clipping is enabled or not for this node.
boolean
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
Group.isEventPropagationEnabled
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
flip
▸ isLayoutInvalidated(): boolean
Return true if layout is invalid
boolean
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
▸ isPickingChildrenEnabled(): boolean
Returns if picking children is enabled or not for this node.
boolean
pickingChildren
Group.isPickingChildrenEnabled
▸ isSelectable(): boolean
Returns true if node can be picked/selected.
boolean
The selectable flag
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ isVerticalFlip(): boolean
Return true if the representation is flipped vertically
boolean
flip
▸ moveTo(area, vAlign?, hAlign?): ColorBar
MoveTo position of node to specified area
| Name | Type | Description |
|---|---|---|
area | Rect | specified area |
Optional vAlign | string | vertical alignment. It can be "top", "bottom", "center". |
Optional hAlign | string | horizontal alignment It can be "left", "right", "center". |
this
▸ notify<E>(type, source, args?): ColorBar
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | ColorBar | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ Protected notifyRoot(event, source, args?): Node
Notify an even to root node
| Name | Type | Description |
|---|---|---|
event | string | type of event |
source | Node | source who called the event |
Optional args | any | event arguments |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: ColorBar, args: EventMap[E]) => void | function to be called |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: ColorBar, args: EventMap[E]) => void | to be called |
this
▸ Protected onBoundsChanged(bounds): ColorBar
Occurs when bounds has been changed
| Name | Type | Description |
|---|---|---|
bounds | Rect | bound of the node in the parent coordinates |
this
▸ Protected onChildAdded(child): void
This method is called it child or children are added
void
▸ Protected onChildRemoved(child): void
This method is called it child or children are removed
| Name | Type | Description |
|---|---|---|
child | Node | removed child |
void
▸ Protected onParentChanged(node): ColorBar
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
▸ Protected postRendering(context, callback?): void
To be called after rendering, used for PDF output
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after rendering |
void
▸ Protected preRendering(context, callback?): void
Occurs before child rendering
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
Optional callback | () => void | callback to be called after rendering of geometry |
void
▸ rebuild(force?, changes?): ColorBar
Rebuild node. This method resets state, cache, and invalidate node.
| Name | Type | Description |
|---|---|---|
Optional force | boolean | optional boolean parameter that can force invalidation |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
▸ removeBaseLayer(baseLayer): ColorBar
Remove child baseLayer
this
▸ removeChild(node, disposeChildren?): ColorBar
Remove child node
| Name | Type | Description |
|---|---|---|
node | Node | Node[] | node or array of nodes to be removed |
Optional disposeChildren | boolean | automatically dispose children. If it is true then method dispose is called for each child. |
this
▸ removeCssClass(cssclass): ColorBar
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): ColorBar
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ removeOverlay(overlay): ColorBar
Remove child overlay
this
▸ render(context): void
Render group
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render group |
void
▸ renderAsync(context, callback): void
Render node in asynchronous mode. This implementation doesn't support cache for now.
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ Protected renderBackground(context, bounds): ColorBar
Render background
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render background |
bounds | Rect | group bounds |
this
▸ 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
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render baseLayers |
this
▸ Protected renderBaseLayersAsync(context, callback): void
Render baseLayers on bottom of cache in asynchronous mode. This method calls renderBaseLayers
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
callback | () => void | callback function |
void
▸ Protected renderChildren(context): void
Render children
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected renderChildrenAsync(context, callback): void
Render children async
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
callback | () => void | callback function to be called then all children are rendered |
void
▸ Protected renderContent(context): void
render to specified context. This method calls preRendering, renderChildren, postRendering
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected renderContentAsync(context, callback): void
Render children in asynchronous mode
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function to be called then all children are rendered |
void
▸ 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
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
this
▸ Protected renderOverlaysAsync(context, callback): void
Render overlays on top of cache in asynchronous mode. This method calls renderOverlays
| Name | Type | Description |
|---|---|---|
context | RenderingContext | context to render overlays |
callback | () => void | callback function |
void
▸ resumeUpdate(rebuild?, changes?): ColorBar
Resume auto update
| Name | Type | Description |
|---|---|---|
Optional rebuild | boolean | force rebuild |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ rotate(theta, x, y): ColorBar
Rotate bounds around a given coordinate
| Name | Type | Description |
|---|---|---|
theta | number | angle to rotate node, in radians |
x | number | x coordinate to rotate around |
y | number | y coordinate to rotate around |
this
▸ scale(xx, yy): ColorBar
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimationStyle(animationStyle): ColorBar
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ 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
| Name | Type | Description |
|---|---|---|
mode | boolean | Model Limits Logics to be used |
this
▸ setAutoModelLimitsStrategy(strategy): ColorBar
Set Model Limits Logics Strategy
| Name | Type | Description |
|---|---|---|
strategy | ModelLimitsStrategy | Model Limits logic strategy to use |
this
Group.setAutoModelLimitsStrategy
▸ setBounds(bounds): ColorBar
Sets bounds of the node in the parent coordinates
| Name | Type | Description |
|---|---|---|
bounds | Type | bound of the node in the parent coordinates |
this
▸ setCache(cache, rebuild?): ColorBar
Sets cache to be used to cache
| Name | Type | Description |
|---|---|---|
cache | Cache | cache to be used |
Optional rebuild | boolean | rebuild cache |
this
▸ setChild(index, node): ColorBar
Replace child node by index
| Name | Type | Description |
|---|---|---|
index | number | index of the node |
node | Node | node |
this
▸ setClipStyle(style): ColorBar
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setContentOrientation(orientation): ColorBar
Set content orientation
| Name | Type | Description |
|---|---|---|
orientation | Orientation | content orientation |
this
▸ setCss(style, merge?): ColorBar
Sets CSS style. This style will be applied for all inserted elements
| Name | Type | Description |
|---|---|---|
style | Type | CSS style to be applied to inserted elements |
Optional merge | boolean | merge flag |
this
▸ setCssClass(name): ColorBar
Sets css class name of the node to be used to apply CSS style
| Name | Type | Description |
|---|---|---|
name | string | css class name of the node |
this
▸ setCssTransform(transform): ColorBar
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setDesiredHeight(value, silent?): ColorBar
Sets desired height of the group as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired height to set, use 'auto' for automatic desired height |
Optional silent | boolean | silent setting |
this
▸ setDesiredWidth(value, silent?): ColorBar
Sets desired width of the group as a layoutable object
| Name | Type | Description |
|---|---|---|
value | string | number | desired width to set |
Optional silent | boolean | silent setting |
this
▸ setFillStyle(fillStyle, merge?): ColorBar
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
this
▸ setHorizontalFlip(enable): ColorBar
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
▸ setId(id): ColorBar
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setInfiniteMode(infinityMode): ColorBar
Set infinity mode flag to draw composite without collision check
| Name | Type | Description |
|---|---|---|
infinityMode | boolean | infinity mode flag |
this
▸ setLayout(layout): ColorBar
Associate layout with a group.
| Name | Type | Description |
|---|---|---|
layout | Record<string, any> | Layout | layout instance to be set or layout properties to apply |
this
▸ Protected setLayoutInvalidated(invalidated): void
Set invalidation status
| Name | Type | Description |
|---|---|---|
invalidated | boolean | invalidated layout |
void
▸ setLayoutStyle(layoutStyle, silent?, merge?): ColorBar
specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
Optional silent | boolean | silent setting |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
this
▸ setLineStyle(lineStyle, merge?): ColorBar
Sets border color Returns this
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setLocalTransform(localTransform, force?): ColorBar
Sets local transformation to be used to transform from local to parent coordinate
| Name | Type | Description |
|---|---|---|
localTransform | Transformation | local transformation for this node |
Optional force | boolean | boolean flag to force update event if transformations are equal, false by default |
this
▸ setMarginsStyle(margins, merge?): ColorBar
Sets margins style
| Name | Type | Description |
|---|---|---|
margins | Type<string | number> | margins style |
Optional merge | boolean | true if you want to merge marginsStyle with existing attribute, false by default |
this
▸ setMarkerPosition(position): ColorBar
Set marker position
| Name | Type | Description |
|---|---|---|
position | MarkerPosition | marker position |
this
▸ setMarkerProperies(properties): ColorBar
Set marker symbol properties
| Name | Type | Description |
|---|---|---|
properties | Options | marker symbol properties |
▸ setModelLimits(limits): ColorBar
Sets inner model limits
| Name | Type | Description |
|---|---|---|
limits | Type | inner limits |
this
▸ setName(name): ColorBar
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): ColorBar
set notification state
| Name | Type | Description |
|---|---|---|
notify | boolean | flag set to invalidate parent or not |
Optional force | boolean | true if parent should be invalidated immediately |
this
▸ setOpacity(opacity, blendMode?): ColorBar
Sets node opacity
| Name | Type | Description |
|---|---|---|
opacity | number | node opacity from 0 to 1 |
Optional blendMode | BlendMode | opacity blend mode. If it is normal, opacity will be replaced. |
this
▸ setOptions(options?): ColorBar
Sets color bar options
| Name | Type | Description |
|---|---|---|
Optional options | Options | colorbar options |
this
▸ setPaddingStyle(paddingStyle, merge?): ColorBar
Sets padding style
| Name | Type | Description |
|---|---|---|
paddingStyle | Type<string | number> | padding style |
Optional merge | boolean | true if you want to merge paddingStyle with existing attribute, false by default |
this
▸ setProperties(properties?): ColorBar
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | properties |
this
▸ setProperty(name, value): ColorBar
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): ColorBar
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): ColorBar
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): ColorBar
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
▸ setSelectable(selectable): ColorBar
Allows to select node. If node is not selectable then child node is not selectable.
| Name | Type | Description |
|---|---|---|
selectable | boolean | flag to allow node selection |
this
▸ setSilent(bool): ColorBar
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): ColorBar
Allows the user to associate any arbitrary object with the node.
| Name | Type | Description |
|---|---|---|
tag | any | The object to be associated with the node. |
this
▸ setTickGenerator(tickGenerator): ColorBar
Set tick generator
| Name | Type | Description |
|---|---|---|
tickGenerator | TickGenerator | Options | tick generator |
this
▸ setVerticalFlip(flip): ColorBar
Set vertical flip of the representation
| Name | Type | Description |
|---|---|---|
flip | boolean | flag to set the vertical flip of the representation |
this
▸ setVisible(value): ColorBar
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setVisibleModelLimits(visibleModelBounds, deviceBounds?): ColorBar
Set visible model limits
| Name | Type | Description |
|---|---|---|
visibleModelBounds | Rect | visible model limits or bounds |
Optional deviceBounds | Rect | device bounds |
this
▸ setZIndex(value): ColorBar
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): ColorBar
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ showMarker(value): ColorBar
Show markers near by color-bar color position
| Name | Type | Description |
|---|---|---|
value | number | marker color value to calculate marker position |
this
▸ suspendUpdate(): ColorBar
Suspend auto update
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): ColorBar
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | AnimatedNode | root node for node |
void
Group.unregisterAnimationStyle
▸ updateLayout(targets?): ColorBar
Updates layout
| Name | Type | Description |
|---|---|---|
Optional targets | ILayoutable[] | optional parameter about which element to layout |
this
▸ updateSceneTransformation(): ColorBar
Update scene transformation
this
Group.updateSceneTransformation
▸ 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
| Name | Type | Description |
|---|---|---|
Optional regions | Rect[] | optional array to return invalid rectangles in the parent coordinates |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ updateSuspended(): boolean
Return state of suspend state
boolean
state of update
▸ Protected updateTimeStamp(): ColorBar
Update time stamp to indicate that Node or Children has been changed.
this
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
Group.enableSceneGraphNotification
▸ Static findParent<T>(node, classType, filter?): InstanceType<T>
Find root of the node with specified type
| Name | Type |
|---|---|
T | extends Constructor<any> |
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | T | type of the class to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
InstanceType<T>
▸ Static findParent(node, classType, filter?): Node
Find root of the node with specified type
| Name | Type | Description |
|---|---|---|
node | Node | node to start search |
classType | string | interface name to search for |
Optional filter | (node: Node) => boolean | additional filter to apply |
▸ Static getClassName(): string
string
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean