API / geotoolkit / gauges / AxisGauge / AxisGauge
Defines a class which implements a gauge displaying data represented by axes. Each axis represents one specific data set with lower and upper limit. Every normal operation, like setting value, function registry, animation, e.t.c, are performed on the axes as opposed to gauge like it is done in the numeric gauges. In this case the gauge works as a container of the axes and is only capable of axis manipulations and abstract gauge functionality.
↳
AxisGauge
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
axes | Axis | JSON with axes properties where the key is the axis name and the property is an object with axis properties. If no axis with such name has been registered, a new axis with the properties will be added |
axes-alarms | Alarm | Alarm to add, an array of such alarms, or object (array of objects) to be passed into the alarm |
axes-alarms-handlername | string | Name of the handler function as defined in Alarm Factory |
axes-alarms-high | number | Upper boundary of range that the alarm is effective on |
axes-alarms-low | number | Lower boundary of range that the alarm is effective on |
axes-alarms-name | string | Name of the alarm for indexing |
axes-alarms-range | Range | Range that the alarm is effective on |
axes-alarms-range-high | number | Upper range boundary |
axes-alarms-range-low | number | Lower range boundary |
axes-alarms-range-max | number | |
axes-alarms-range-min | number | |
axes-animationfunction | Functions | Name of animation function |
axes-animationtime | number | Animation time |
axes-clipstyle | ClipStyle | Clipping style |
axes-clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
axes-clipstyle-geometry | GraphicsPath | Clipping geometry |
axes-clipstyle-geometry-bounds | Rect | Bounds |
axes-clipstyle-geometry-bounds-height | number | Height |
axes-clipstyle-geometry-bounds-readonly | boolean | Readonly |
axes-clipstyle-geometry-bounds-width | number | Width |
axes-clipstyle-geometry-bounds-x | number | Left |
axes-clipstyle-geometry-bounds-y | number | Top |
axes-clipstyle | GraphicsPath | Clipping style |
axes-cssclass | string | The css class name of this node |
axes-csscursor | string | CSS cursor associated with node |
axes-cssstyle | string | CSS style to be applied to inserted elements |
axes-id | string | number | Id of the node, its a unique identifier |
axes-linestyle | string | Line style for main region |
axes-linestyle | LineStyle | Line style for main region |
axes-linestyle-color | string | Color in CSS form |
axes-linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
axes-linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
axes-linestyle-fill-color | string | Color in CSS form |
axes-linestyle-fill-evenoddmode | boolean | Even-odd fill mode |
axes-linestyle-fill-fillpattern | Pattern | Pattern |
axes-linestyle-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 |
axes-linestyle-fill-fillpattern-patternname | string | Name of this pattern for indexing |
axes-linestyle-fill-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
axes-linestyle-fill-foreground | string | Foreground color |
axes-linestyle-fill-pattern | Pattern | Pattern |
axes-linestyle-linecap | CapStyle | The line cap style |
axes-linestyle-linedashoffset | number | Line dash offset of dashed line |
axes-linestyle-linejoin | JoinStyle | The line join style |
axes-linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
axes-linestyle-scalable | boolean | True if width should depend on transformation |
axes-linestyle-unit | string | Optional unit for the width |
axes-linestyle-width | number | string | The line thickness |
axes-localtransform | Transformation | Local transformation |
axes-localtransform-dx | number | X axis translation |
axes-localtransform-dy | number | Y axis translation |
axes-localtransform-xx | number | X scale |
axes-localtransform-xy | number | Xy skew |
axes-localtransform-yx | number | Yx skew |
axes-localtransform-yy | number | Y scale |
axes-margins | number | string | It has properties for specifying the margins for each side |
axes-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
axes-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 |
axes-opacityblendmode | BlendMode | Node opacity mode to blend it |
axes-range | Range | Range see |
axes-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
axes-scalescrollstrategy-enabled | boolean | Enable flag |
axes-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
axes-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 |
axes-tickgenerator | TickGenerator | The tick generator for the axis |
axes-tickgenerator-labelstyles | TextStyle | An object containing label style for specified grades |
axes-tickgenerator-labelstyles-alignment | AlignmentStyle | Alignment |
axes-tickgenerator-labelstyles-autosize | boolean | Auto font size on high definition display |
axes-tickgenerator-labelstyles-background | string | Background style |
axes-tickgenerator-labelstyles-background | FillStyle | Background style |
axes-tickgenerator-labelstyles-baseline | BaseLineStyle | Base line |
axes-tickgenerator-labelstyles-color | string | Color in CSS form |
axes-tickgenerator-labelstyles-fill | FillStyle | Text fill style |
axes-tickgenerator-labelstyles-font | string | Font see |
axes-tickgenerator-labelstyles-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
axes-tickgenerator-labelstyles-lineheight | string | number | Line height |
axes-tickgenerator-labelstyles-multiline | boolean | Allow multi-line text |
axes-tickgenerator-labelstyles-outline | string | Outline style |
axes-tickgenerator-labelstyles-outline | LineStyle | Outline style |
axes-tickgenerator-labelstyles-overflowwrap | OverflowWrapStyle | Overflow wrap |
axes-tickgenerator-labelstyles-strikethrough | string | Strikethrough style |
axes-tickgenerator-labelstyles-strikethrough | LineStyle | Strikethrough style |
axes-tickgenerator-labelstyles-textoverflow | TextOverflowStyle | Text overflow |
axes-tickgenerator-labelstyles-underline | string | Underline style |
axes-tickgenerator-labelstyles-underline | LineStyle | Underline style |
axes-tickgenerator-labelstyles-underlineoffset | string | number | Underline offset distance |
axes-tickgenerator-labelstyles-whitespace | WhiteSpaceStyle | White space |
axes-tickgenerator-labelstyles-wordbreak | WordBreakStyle | Word break |
axes-tickgenerator-tag | any | Tag user can specify info associated with current object |
axes-tickgenerator-tickstyles | LineStyle | An object containing tick styles for specified grades |
axes-transform | string | Additional CSS transformation applied to node or 'none' |
axes-transform | Transformation | Additional CSS transformation applied to node or 'none' |
axes-units | string | Units to append to the end |
axes-value | number | Value of the axis |
axes-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
axes-z-index | number | Define node z-index |
bounds | Rect | Bounds of the gauge in parent model limits. Will override x,y,widht,height |
clipping | boolean | Container group clipping |
clipstyle | ClipStyle | Clipping style |
clipstyle | GraphicsPath | Clipping style |
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 | A new fill style |
fillstyle | FillStyle | A new fill style |
height | number | Height of the gauge in its parent model limits |
id | string | number | Id of the node, its a unique identifier |
linestyle | string | Line style |
linestyle | LineStyle | Line style |
localtransform | Transformation | Local transformation |
margins | number | string | It has properties for specifying the margins for each side |
name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
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 |
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 |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
width | number | Width of the gauge in its parent model limits |
x | number | X coordinate of left top corner of the gauge in its parent model limits |
y | number | Y coordinate of left top corner of the gauge in its parent model limits |
z-index | number | Define node z-index |
Constructors
• Protected new AxisGauge(options?)
| Name | Type |
|---|---|
Optional options | Options |
AbstractGauge.constructor
Methods
▸ Abstract addAxis(params): Axis
Adds a new axis to the axis gauge.
▸ addCssClass(cssclass): AxisGauge
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addCustomComponent(component, region, layer): AxisGauge
Adds a custom component to provided specified region. A custom component is a group with any geometry inside. The group bounds will be changed to fit the region it is added to. To maintain the size of your custom group it is better to add a custom region to the gauge.
| Name | Type | Description |
|---|---|---|
component | Group<Node> | A group with custom shape(s) |
region | string | Name of the region to add component to. If such region does not exist nothing will happen and the custom shape will not be added |
layer | string | name of gauge layer to add component |
AbstractGauge.addCustomComponent
▸ addInvalidateHandler(handler): AxisGauge
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
AbstractGauge.addInvalidateHandler
▸ addRegion(name, region?): AxisGauge
Adds a new region to the gauge. Region is a rectangular area on the gauge defined by x, y, width and height all set in CSS format.
Throws
When name is not provided to the custom region
| Name | Type | Description |
|---|---|---|
name | string | Options | Name of the region or a json with region parameters (including name) |
Optional region | Options | JSON with region parameters |
▸ Protected applyOpacity(context): AxisGauge
This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
this
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
AbstractGauge.applyResponsiveStyle
▸ checkCollision(context): boolean
Check if gauge falls within visible area on the screen
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if object is inside of rendarable area
▸ clearAxes(): void
Clears gauge axes
void
▸ clone(): Node
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): AxisGauge
Connects style.
This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks
| Name | Type | Description |
|---|---|---|
style | EventDispatcher | connect style |
type | string | type of event or property |
callback | AttributeCallback<EventDispatcher> | function to be called |
this
▸ Protected copyConstructor(gauge): AxisGauge
Copy constructor function Used to clone gauge
| Name | Type | Description |
|---|---|---|
gauge | AxisGauge | source gauge |
▸ disconnectStyle(style, type, callback): AxisGauge
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
▸ displayRegions(name?): AxisGauge
Debug method to display regions of the gauge in different colors
| Name | Type | Description |
|---|---|---|
Optional name | string | If you want to display only one region, pass its name here |
▸ dispose(): void
Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null.
void
▸ enableClipping(clipping): AxisGauge
Sets innergroup clipping
| Name | Type | Description |
|---|---|---|
clipping | boolean | clipping |
▸ enableEventPropagation(enable): AxisGauge
Enable event propagation from the node hierarchy from bottom to top
This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.
Example
import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');
parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();| Name | Type | Description |
|---|---|---|
enable | boolean | enable |
this
AbstractGauge.enableEventPropagation
▸ enumerateNodes(callback, target?): void
Enumerate children nodes
| Name | Type | Description |
|---|---|---|
callback | Callback<Node | CustomComponent | Alarm> | callback |
Optional target | QueryBuilder<any> | target |
void
▸ execute(delegate): AxisGauge
Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.
Example
// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});
group.getLineStyle().setPattern('pattern');
return group;
// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});| Name | Type | Description |
|---|---|---|
delegate | (this: AxisGauge) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: AxisGauge) => 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
AbstractGauge.getAnimationStyle
▸ getAxes(filter?): Iterator<Axis>
Returns an iterator over existing axes in this gauge
| Name | Type | Description |
|---|---|---|
Optional filter | (item: Axis) => boolean | a filter function. Returns all axes if null |
▸ getAxis(name): Axis
Gets an axis by its name or index from axes iterator
| Name | Type | Description |
|---|---|---|
name | string | number | Name of the axis or its index |
▸ getBounds(): Rect
Returns current bounds of the gauge
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ 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
▸ getCustomComponent(index): Group<Node>
Returns a registered custom component by its index
| Name | Type | Description |
|---|---|---|
index | string | number | Index or name of the component to return |
Null if no such index exists
AbstractGauge.getCustomComponent
▸ getCustomComponents(filter?): Iterator<Group<Node>>
Return iterator on registered custom components
| Name | Type | Description |
|---|---|---|
Optional filter | (item: Group<Node>) => boolean | a filter function. Returns all nodes if null |
AbstractGauge.getCustomComponents
▸ getFunctionRegistry(): FunctionRegistry
Returns function registry which provides handlers for gauges animation and alarms
registry New registry to set
AbstractGauge.getFunctionRegistry
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
AbstractGauge.getInvalidateMethod
▸ getLayoutStyle(): LayoutStyle<string | number>
Returns the current layout of the gauge
LayoutStyle<string | number>
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
AbstractGauge.getLocalTransform
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ 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
AbstractGauge.getOpacityBlendMode
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Gets properties pertaining to this gauge.
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[]
▸ getRegion(name): Region
Returns the region registered with provided name.
| Name | Type | Description |
|---|---|---|
name | string | Name of the region to return |
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
AbstractGauge.getRenderingFilter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
AbstractGauge.getResponsiveStyle
▸ 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
AbstractGauge.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
AbstractGauge.getSceneTransform
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getWorldTransform(): Transformation
Retrieves the local transformation of the node which represents multiplication of parent to bounds and contents transformations.
transform the world transform.
AbstractGauge.getWorldTransform
▸ getZIndex(): number
Returns node z-index (null if not set)
number
▸ hasAxis(axis): boolean
Checks if the gauge contains specified axis
| Name | Type | Description |
|---|---|---|
axis | string | Axis | The axis or its name |
boolean
▸ 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
AbstractGauge.hasEventListener
▸ hideRegions(): AxisGauge
Hides the regions displayed for debug reasons
▸ invalidate(bounds?, force?): AxisGauge
Invalidate area of the shape. This method invalidates parent by default. invalidated from parent to root node.
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | bounds of the invalid rectangle in the inner node coordinates |
Optional force | boolean | true if parent should be invalidated immediately if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
this
▸ Protected invalidateParent(bounds?, force?): AxisGauge
Invalidate parent and notify all listeners. NOTE: Don't keep arguments of the event, because instance can be changed
Fires
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | bounds of the invalid rectangle in the inner node coordinates |
Optional force | boolean | force rendering |
this
AbstractGauge.invalidateParent
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
AbstractGauge.isEventPropagationEnabled
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
AbstractGauge.isNotificationEnabled
▸ 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
▸ notify<E>(event, source, args?): AxisGauge
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
event | E | type of event |
source | AbstractNode | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ off<E>(type?, callback?): AxisGauge
Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: AxisGauge, args: EventMap<Node>[E]) => void | function to be called |
this
▸ on<E>(type, callback): AxisGauge
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: AxisGauge, args: EventMap<Node>[E]) => void | to be called |
this
▸ Protected onParentChanged(node): AxisGauge
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
AbstractGauge.onVisibilityChanged
▸ Protected postRendering(context): void
To be called after rendering. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ Protected preRendering(context): void
Occurs before rendering this method sets clipping by default. Call this method if you override method render
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
void
▸ reassignAxisName(oldName, newName): AxisGauge
Changes the name of axis in the map without needing to remove and readd the axis
| Name | Type | Description |
|---|---|---|
oldName | string | Old name of the axis |
newName | string | New name of the axis |
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
AbstractGauge.registerAnimationStyle
▸ removeAxis(name): AxisGauge
Removes an axis from the gauge. If no such axis exists, nothing will be done.
| Name | Type | Description |
|---|---|---|
name | string | number | Name of the axis or its index |
▸ removeCssClass(cssclass): AxisGauge
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeCustomComponent(component): AxisGauge
Removes a registered custom component from the gauge. If such component was not registered, does nothing.
| Name | Type | Description |
|---|---|---|
component | number | Group<Node> | The component which has to be deleted, or its index in iterator. |
AbstractGauge.removeCustomComponent
▸ removeInvalidateHandler(handler): AxisGauge
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
AbstractGauge.removeInvalidateHandler
▸ removeRegion(name): AxisGauge
Deletes a region from the layout. Only custom added regions can be removed. Will do nothing if no such region was registered
| Name | Type | Description |
|---|---|---|
name | string | Name of the region |
▸ render(context): AxisGauge
Renders node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
▸ renderAsync(context, callback): void
Render node in asynchronous mode. Default implementation creates call method "render" inside
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
callback | () => void | callback function |
void
▸ rotate(theta, x, y): AxisGauge
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): AxisGauge
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimationStyle(animationStyle): AxisGauge
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
AbstractGauge.setAnimationStyle
▸ setBounds(bounds): AxisGauge
Sets bounds to the gauge
| Name | Type | Description |
|---|---|---|
bounds | Rect | New bounds |
▸ setClipStyle(style): AxisGauge
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): AxisGauge
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): AxisGauge
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): AxisGauge
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setFunctionRegistry(registry): AxisGauge
Sets function registry which will provide handlers for gauges animation and alarms
| Name | Type | Description |
|---|---|---|
registry | FunctionRegistry | New registry to set |
AbstractGauge.setFunctionRegistry
▸ setId(id): AxisGauge
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLayoutStyle(layoutStyle, merge?): AxisGauge
Specify desired layout style
| Name | Type | Description |
|---|---|---|
layoutStyle | LayoutStyle<string | number> | Options<string | number> | desired layout style |
Optional merge | boolean | true if you want to merge layoutStyle with existing attribute, false by default |
▸ setLocalTransform(localTransform): AxisGauge
Sets local transformation to be used to transform from local to parent coordinate
| Name | Type | Description |
|---|---|---|
localTransform | Transformation | local transformation for this node |
AbstractGauge.setLocalTransform
▸ setMarginsStyle(margins, merge?): AxisGauge
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
▸ setName(name): AxisGauge
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): AxisGauge
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?): AxisGauge
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
▸ setProperties(props?): AxisGauge
Sets properties pertaining to this gauge.
| Name | Type | Description |
|---|---|---|
Optional props | Options | Properties to set |
▸ setProperty(name, value): AxisGauge
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRange(range): AxisGauge
If this method is called on the gauge instead of an axis, the value and skipAnimation will be propagated to each axis registered for the gauge. Equivalent to looping through each axis and setting this value. Sets a new data range displayed by this axis
| Name | Type | Description |
|---|---|---|
range | RangeOptions | New range to set |
▸ setRegionSize(regionType, size): AxisGauge
For North, South sides sets height, for East and West sets width, for custom regions sets x, y, width and height
| Name | Type | Description |
|---|---|---|
regionType | string | Name of the region |
size | string | number | Region | Width or height of a side in CSS format, or an object with properties for custom regions |
▸ setRenderingFilter(filter): AxisGauge
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
AbstractGauge.setRenderingFilter
▸ setResponsiveStyle(style): AxisGauge
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
AbstractGauge.setResponsiveStyle
▸ setScaleScrollStrategy(strategy?): AxisGauge
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
AbstractGauge.setScaleScrollStrategy
▸ setSelectable(selectable): AxisGauge
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): AxisGauge
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): AxisGauge
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
▸ setValue(val, skipAnimation?): AxisGauge
If this method is called on the gauge instead of an axis, the value and skipAnimation will be propagated to each axis registered for the gauge. Equivalent to looping through each axis and setting this value.
| Name | Type | Description |
|---|---|---|
val | number | New value for each axis |
Optional skipAnimation | boolean | True to not animate |
▸ setVisible(value): AxisGauge
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setZIndex(value): AxisGauge
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): AxisGauge
Shear this node's bounds
| Name | Type | Description |
|---|---|---|
shx | number | x-axis shear |
shy | number | y-axis shear |
this
▸ toString(): string
Returns a string representation of this object (generally the classname)
string
A string representation
▸ translate(tx, ty): AxisGauge
Translate bounds
| Name | Type | Description |
|---|---|---|
tx | number | x translation |
ty | number | y translation |
this
▸ unregisterAnimationStyle(root): void
Unregister animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
AbstractGauge.unregisterAnimationStyle
▸ updateSceneTransformation(): AxisGauge
Update scene transformation
this
AbstractGauge.updateSceneTransformation
▸ updateState(regions?, changes?): AxisGauge
Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph
| 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
▸ Protected updateTimeStamp(): AxisGauge
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
AbstractGauge.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