API / geotoolkit / gauges / axis / CircularAxis / CircularAxis
axis.CircularAxis.CircularAxis
Implements an axis which uses Tick Generators to calculate number of ticks and their positions. This axis calculates the ticks dynamically to not allow any intersections among labels and ticks. The axis allows to render ticks and labels in three positions: inside: tick growing from the inner bound of the axis towards the center outside: tick growing from outer bound of axis towards the center
↳
CircularAxis
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
alarms | Alarm | Alarm to add, an array of such alarms, or object (array of objects) to be passed into the alarm |
alarms-handlername | string | Name of the handler function as defined in Alarm Factory |
alarms-high | number | Upper boundary of range that the alarm is effective on |
alarms-low | number | Lower boundary of range that the alarm is effective on |
alarms-name | string | Name of the alarm for indexing |
alarms-range | Range | Range that the alarm is effective on |
alarms-range-high | number | Upper range boundary |
alarms-range-low | number | Lower range boundary |
alarms-range-max | number | |
alarms-range-min | number | |
animationfunction | Functions | Name of animation function |
animationtime | number | Animation time |
center | Point | Center |
center-x | number | X coordinate |
center-y | number | Y coordinate |
clipstyle | ClipStyle | Clipping style |
clipstyle-evenodd | boolean | True if evenodd mode is on ('nonzero' mode otherwise) |
clipstyle-geometry | GraphicsPath | Clipping geometry |
clipstyle-geometry-bounds | Rect | Bounds |
clipstyle-geometry-bounds-height | number | Height |
clipstyle-geometry-bounds-readonly | boolean | Readonly |
clipstyle-geometry-bounds-width | number | Width |
clipstyle-geometry-bounds-x | number | Left |
clipstyle-geometry-bounds-y | number | Top |
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 |
endangleoffset | number | string | The distance (offset) of the start angle of the axis from start angle of the gauge. Shrinks the axis counterclockwise |
fillstyle | string | Fill style of the base arc of the axis |
fillstyle | FillStyle | Fill style of the base arc of the axis |
fillstyle-color | string | Color in CSS form |
fillstyle-evenoddmode | boolean | Even-odd fill mode |
fillstyle-fillpattern | Pattern | Pattern |
fillstyle-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 |
fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
fillstyle-foreground | string | Foreground color |
fillstyle-pattern | Pattern | Pattern |
id | string | number | Id of the node, its a unique identifier |
linestyle | string | Line style for main region |
linestyle | LineStyle | Line style for main region |
linestyle-color | string | Color in CSS form |
linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
linestyle-linecap | CapStyle | The line cap style |
linestyle-linedashoffset | number | Line dash offset of dashed line |
linestyle-linejoin | JoinStyle | The line join style |
linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
linestyle-scalable | boolean | True if width should depend on transformation |
linestyle-unit | string | Optional unit for the width |
linestyle-width | number | string | The line thickness |
localtransform | Transformation | Local transformation |
localtransform-dx | number | X axis translation |
localtransform-dy | number | Y axis translation |
localtransform-xx | number | X scale |
localtransform-xy | number | Xy skew |
localtransform-yx | number | Yx skew |
localtransform-yy | number | Y scale |
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 |
needle | Options | Properties defining the needle |
needle-cssclass | string | The css class name of this node |
needle-id | string | number | Id of the node, its a unique identifier |
needle-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
needle-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
needle-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 |
needle-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
needle-z-index | number | Define node z-index |
needle | NeedleOptions | Properties defining the needle |
needle-center | Point | A point in model of needle which serves as an anchor point for rotation and centering the needle with the gauge |
needle-geometry | Group | Geotoolkit group containing the shapes which form the geometry of the needle |
needle-geometry-automodellimitsmode | boolean | Auto model limits mode |
needle-geometry-bounds | Rect | Define position of the group in the parent |
needle-geometry-clipping | boolean | Enable clipping, this does not consider the clipstyle, it is related to bounds-clipping |
needle-geometry-clipstyle | ClipStyle | Clipping style |
needle-geometry-clipstyle | GraphicsPath | Clipping style |
needle-geometry-contentorientation | Orientation | Content orientation |
needle-geometry-cssclass | string | The css class name of this node |
needle-geometry-csscursor | string | CSS cursor associated with node |
needle-geometry-cssstyle | string | CSS style to be applied to inserted elements |
needle-geometry-fillstyle | string | Fill style |
needle-geometry-fillstyle | FillStyle | Fill style |
needle-geometry-horizontalflip | boolean | Horizontal axis goes from right to left |
needle-geometry-id | string | number | Id of the node, its a unique identifier |
needle-geometry-infinity | boolean | Mode to render outside the model limits |
needle-geometry-layoutstyle | LayoutStyle | Layout style to be used for parent layout |
needle-geometry-layoutstyle-constraint | SizeConstraint | Layout constrains |
needle-geometry-layoutstyle-flexgrow | number | Number specifying how much the item will grow relative to the rest of the items inside the same container |
needle-geometry-layoutstyle-flexshrink | number | Number specifying how much the item will shrink relative to the rest of the items inside the same container |
needle-geometry-layoutstyle-float | string | Float position |
needle-geometry-layoutstyle-position | string | Layout position |
needle-geometry-layoutstyle-size | number | string | Layout size |
needle-geometry-linestyle | string | Line style |
needle-geometry-linestyle | LineStyle | Line style |
needle-geometry-localtransform | Transformation | Local transformation |
needle-geometry-margins | number | string | It has properties for specifying the margins for each side |
needle-geometry-modellimits | Rect | Define inner model coordinates of the group |
needle-geometry-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
needle-geometry-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 |
needle-geometry-opacityblendmode | BlendMode | Node opacity mode to blend it |
needle-geometry-padding | number | string | It has properties for specifying the padding for each side |
needle-geometry-pickingchildren | boolean | Enable picking children |
needle-geometry-scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
needle-geometry-scalescrollstrategy-enabled | boolean | Enable flag |
needle-geometry-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
needle-geometry-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 |
needle-geometry-transform | string | Additional CSS transformation applied to node or 'none' |
needle-geometry-transform | Transformation | Additional CSS transformation applied to node or 'none' |
needle-geometry-verticalflip | boolean | Vertical axis goes from bottom to top |
needle-geometry-viewcache | boolean | View cache to cache child nodes |
needle-geometry-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
needle-geometry-z-index | number | Define node z-index |
needle-position | DynamicElementPosition | Layer on which the needle should be positioned, either in front of all components, or in the back |
needle-radius | number | string | For circular needle the length of the needle relative to the radius of the axis. The length will be calculated automatically and if the needle has to be enlarged or shrinked, this will be done with preservation of aspect ratio |
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 |
parentradius | number | string | Parent radius |
radius | number | string | Radius of the axis in CSS format (relative to gauge radius) |
range | Range | Range see |
reversed | boolean | Angles counting orientation relative to gauge |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
shadow | ShadowOptions | JSON with shadow properties |
shadow-color | string | Color of the filling of the gauge shadows |
shadow-innerradius | number | Inner radius (axis's inner by default) |
shadow-linecap | CapStyle | Style of the edges of the shadow |
shadow-outerradius | number | Outer radius (axis's outer by default) |
shadow-position | DynamicElementPosition | Shadow position |
shadow-visible | boolean | Visibility flag for the shadow |
startangle | number | string | Start angle |
startangleoffset | number | string | The distance (offset) of the start angle of the axis from start angle of the gauge. Rotates the axis clockwise |
sweepangle | number | string | Sweep angle |
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 |
thickness | number | string | Thickness of the axis base in CSS format (relative to the radius of the axis) |
tickgenerator | TickGenerator | The tick generator for the axis |
tickgenerator-labelstyles | TextStyle | An object containing label style for specified grades |
tickgenerator-labelstyles-alignment | AlignmentStyle | Alignment |
tickgenerator-labelstyles-autosize | boolean | Auto font size on high definition display |
tickgenerator-labelstyles-background | string | Background style |
tickgenerator-labelstyles-background | FillStyle | Background style |
tickgenerator-labelstyles-baseline | BaseLineStyle | Base line |
tickgenerator-labelstyles-color | string | Color in CSS form |
tickgenerator-labelstyles-fill | FillStyle | Text fill style |
tickgenerator-labelstyles-font | string | Font see |
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 |
tickgenerator-labelstyles-lineheight | string | number | Line height |
tickgenerator-labelstyles-multiline | boolean | Allow multi-line text |
tickgenerator-labelstyles-outline | string | Outline style |
tickgenerator-labelstyles-outline | LineStyle | Outline style |
tickgenerator-labelstyles-overflowwrap | OverflowWrapStyle | Overflow wrap |
tickgenerator-labelstyles-strikethrough | string | Strikethrough style |
tickgenerator-labelstyles-strikethrough | LineStyle | Strikethrough style |
tickgenerator-labelstyles-textoverflow | TextOverflowStyle | Text overflow |
tickgenerator-labelstyles-underline | string | Underline style |
tickgenerator-labelstyles-underline | LineStyle | Underline style |
tickgenerator-labelstyles-underlineoffset | string | number | Underline offset distance |
tickgenerator-labelstyles-whitespace | WhiteSpaceStyle | White space |
tickgenerator-labelstyles-wordbreak | WordBreakStyle | Word break |
tickgenerator-tag | any | Tag user can specify info associated with current object |
tickgenerator-tickstyles | LineStyle | An object containing tick styles for specified grades |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
units | string | Units to append to the end |
value | number | Value of the axis |
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 |
Methods
▸ addAlarm(alarm): CircularAxis
Adds an alarm to the axis. Alarm handler will be called every time value set on the axis falls within alarm's range
| Name | Type | Description |
|---|---|---|
alarm | Alarm | Options | Options[] | Alarm[] | An alarm to add, an array of such alarms, or object (array of objects) to be passed into the alarm |
this
▸ addCssClass(cssclass): CircularAxis
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): CircularAxis
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ addRegion(regions): CircularAxis
Adds a region or an array of regions to the axis. Regions are defined by color and range in bounds of the range displayed by the gauge.
| Name | Type | Description |
|---|---|---|
regions | Region | Region[] | Options | Options[] | Array of regions, a region, or region properties |
▸ Protected applyOpacity(context): CircularAxis
This method is called to apply opacity if it is specified on the rendering context. The default implementation sets global alpha on the rendering context
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
this
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
▸ checkCollision(context): boolean
Check if this node is within the area being rendered by the context
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if object is inside of renderable area
▸ cleanAlarms(): CircularAxis
Removes all registered alarms
▸ cleanRegions(): CircularAxis
Removes all registered regions from the axis
▸ clone(): Node
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): CircularAxis
Connects style.
This convenience method subscribes a listener to given style for the specified type.
And automatically un-subscribes listener if node is disposed to prevent memory leaks
| 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?): CircularAxis
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
| Name | Type | Description |
|---|---|---|
src | AbstractNode | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ disconnectStyle(style, type, callback): CircularAxis
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
Disposes this node, once disposes a node should not be used anymore.
Clear all listeners, and disconnect styles to avoid memory leaks.
Also aggressively 'cleanup' this node by setting some of its members to null. Disposes value and name shapes as well
void
▸ enableEventPropagation(enable): CircularAxis
Enable event propagation from the node hierarchy from bottom to top
This option is similar to DOM Event bubbling, which allows to get any event from child node. By default it is disabled for better performance.
Example
import {Group} from '@int/geotoolkit/scene/Group';
import {Events as SceneEvents} from '@int/geotoolkit/scene/Node';
const parentGroup = new Group()
.setName('ParentGroup')
.enableEventPropagation(true);
const childGroup = new Group()
.setName('ChildGroup');
parentGroup.addChild(childGroup);
parentGroup.on(SceneEvents.Invalidate, (eventName, sender, args) => {
// Got notifications from all children of parent group
});
childGroup.invalidate();| Name | Type | Description |
|---|---|---|
enable | boolean | enable |
this
▸ enumerateNodes(callback, target?): void
Enumerate children nodes
| Name | Type | Description |
|---|---|---|
callback | Callback<Alarm | Region> | callback |
Optional target | QueryBuilder<any> | target |
void
▸ execute(delegate): CircularAxis
Executes delegate and return the result. It allows us to keep all initialization calls in one place,
and we do not need to scroll up or down in IDE to find how and where it was initialized.
Example
// All setters (.setName() for example) returns reference to the this.
// In order to modify inner object like LineStyle or Pattern, to get this object (property) we should call getter to get object reference.
// Then modify it as shown below in Option 1 or you can use execute methods shown in Option 2.
import {Group} from '@int/geotoolkit/scene/Group';
import {Rect} from '@int/geotoolkit/util/Rect';
// Option 1
const group = new Group()
.setName('MyGroup')
.setBounds(new Rect(0, 0, 42, 16))
.enableClipping(true)
.setTag({'type': 'sometype'});
group.getLineStyle().setPattern('pattern');
return group;
// Options 2 ( using execute method )
return group
.execute(function () {
this.getLineStyle()
.setPattern("pattern");
});| Name | Type | Description |
|---|---|---|
delegate | (this: CircularAxis) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: CircularAxis) => 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)
▸ getAlarm(name): Alarm
Gets the alarm referenced by provided name or index. If alarm name is not set or no such index exists, null will be returned.
| Name | Type | Description |
|---|---|---|
name | string | number | Name of alarm or its index in iterator |
▸ getAlarms(filter?): Iterator<Alarm>
Gets an iterator over existing alarms in the gauge
| Name | Type | Description |
|---|---|---|
Optional filter | (item: Alarm) => boolean | a filter function. Returns all axes if null |
▸ getAnimation(): string
Returns the name of animation function associated with this axis
string
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ getAnimationTime(): number
Returns time in which an animation should be finished in seconds
number
▸ getBounds(): Rect
Gets bound of the axis
▸ 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
▸ getFunctionRegistry(): FunctionRegistry
Returns function registry which provides handlers for gauges animation and alarms
registry New registry to set
▸ 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
▸ getLabelProperties(grade): LabelOptionsOut
Returns properties pertaining to labels of requested grade
| Name | Type | Description |
|---|---|---|
grade | string | tick grade ('edge', 'major', 'minor') |
properties
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getModelLimits(): Rect
▸ getName(): string
Returns the node name
string
The node name
▸ getNameProperties(): NameOptionsOut
Returns properties pertaining to name text
properties
▸ getNeedleGeometry(): Group<Node>
Gets the current needle geometry
▸ getNeedleOptions(): NeedleOptionsOut
Gets properties pertaining to needle
properties
▸ getNeedlePosition(): string
Gets position of the needle (bottom layer or top layer)
string
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Returns an object with properties pertaining to this axis
Object with 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[]
▸ getRange(): Range
Returns the range of this axis
▸ 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
▸ getShadowColor(): string
Gets the color of shadow fill for the gauge
string
color
▸ getShadowProperties(): ShadowOptionsOut
Gets properties pertaining to shadow of the axis
properties
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTickGenerator(): TickGenerator
Returns the tick generator pertaining to this axis
▸ getTickProperties(grade): TickOptionsOut
Returns properties of the tick with provided grade
| Name | Type | Description |
|---|---|---|
grade | string | tick grade ('edge', 'major', 'minor') |
▸ getValue(ignoreNaN?): number
Returns the value of the axis
| Name | Type | Description |
|---|---|---|
Optional ignoreNaN | boolean | if true, pass last real value |
number
▸ getValueProperties(): ValueOptionsOut
Returns an object with properties pertaining to the value shape
properties
▸ 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.
▸ 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
▸ invalidate(bounds?, force?): CircularAxis
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?): CircularAxis
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
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
Axis.isEventPropagationEnabled
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
▸ 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>(type, source, args?): CircularAxis
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | Axis | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ off<E>(type?, callback?): CircularAxis
Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: CircularAxis, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): CircularAxis
Attach listener on event that will be called whenever the specified event is delivered to the target
If the callback function is already in the list of event listeners for this target, the function is not added a second time.
If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: CircularAxis, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(node): CircularAxis
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): 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
▸ redraw(): CircularAxis
Recalculates the parameters of the axis and rerenders
this
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
▸ removeAlarm(name): CircularAxis
Removes an alarm by its name, index, or instance of alarm
| Name | Type | Description |
|---|---|---|
name | string | number | Alarm | Name of alarm or its index in iterator |
this
▸ removeCssClass(cssclass): CircularAxis
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): CircularAxis
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
▸ render(context): void
Renders the axis and ticks
| Name | Type | Description |
|---|---|---|
context | RenderingContext | rendering context |
void
▸ 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): CircularAxis
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): CircularAxis
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimation(name): CircularAxis
Sets the name of animation function corresponding to this axis
| Name | Type | Description |
|---|---|---|
name | string | New function name |
▸ setAnimationStyle(animationStyle): CircularAxis
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setAnimationTime(time): CircularAxis
Sets time in which an animation should be finished in seconds
| Name | Type | Description |
|---|---|---|
time | number | Time in seconds to perform the animation |
this
▸ Protected setBounds(bounds): CircularAxis
Sets bounds of the axis
| Name | Type | Description |
|---|---|---|
bounds | Rect | bounds of axis |
▸ setClipStyle(style): CircularAxis
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): CircularAxis
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): CircularAxis
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): CircularAxis
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setFunctionRegistry(registry): CircularAxis
Sets function registry which will provide handlers for gauges animation and alarms
| Name | Type | Description |
|---|---|---|
registry | FunctionRegistry | New registry to set |
▸ setId(id): CircularAxis
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLabelProperties(grade, props): CircularAxis
Sets properties pertaining to labels for ticks of provided grade
| Name | Type | Description |
|---|---|---|
grade | string | Grade of the ticks that properties should be applied to |
props | LabelOptions | properties |
▸ setLocalTransform(localTransform, force?): CircularAxis
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?): CircularAxis
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): CircularAxis
Changes the name of the axis
| Name | Type | Description |
|---|---|---|
name | string | The new axis name |
this
▸ setNameProperties(props): CircularAxis
Sets properties pertaining to name shape of the gauge
| Name | Type | Description |
|---|---|---|
props | NameOptions | properties |
▸ setNeedle(params): CircularAxis
Sets the needle for the axis
| Name | Type | Description |
|---|---|---|
params | NeedleOptions | JSON with needle properties |
this
▸ setNeedleOptions(props): CircularAxis
Sets options pertaining to the needle
| Name | Type | Description |
|---|---|---|
props | NeedleOptions | properties |
▸ setNeedleVisible(visible): CircularAxis
Shows or hides the needle
| Name | Type | Description |
|---|---|---|
visible | boolean | Visibility flag for the needle |
▸ setNotification(notify, force?): CircularAxis
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?): CircularAxis
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?): CircularAxis
Sets properties pertaining to this axis
| Name | Type | Description |
|---|---|---|
Optional props | Options | Object with properties |
▸ setProperty(name, value): CircularAxis
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRange(range): CircularAxis
Sets a new data range displayed by this axis
| Name | Type | Description |
|---|---|---|
range | RangeIn | New range to set |
▸ setRenderingFilter(filter): CircularAxis
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): CircularAxis
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): CircularAxis
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
▸ setSelectable(selectable): CircularAxis
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
▸ setShadowColor(color): CircularAxis
Sets the color of shadow fill for the gauge
| Name | Type | Description |
|---|---|---|
color | string | RgbaColor | New color of the value fill |
this
▸ setShadowProperties(props): CircularAxis
Sets properties pertaining to shadow of the axis
| Name | Type | Description |
|---|---|---|
props | ShadowOptions | properties |
this
▸ setSilent(bool): CircularAxis
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): CircularAxis
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): CircularAxis
Sets a new tick generator on the axis
| Name | Type | Description |
|---|---|---|
tickGenerator | TickGenerator | tick generator |
▸ setTickProperties(grade, props): CircularAxis
Sets the properties pertaining to the ticks of provided grade
| Name | Type | Description |
|---|---|---|
grade | string | Grade of the tick to apply properties to |
props | TickOptions | properties |
▸ setValue(val, skipAnimation?): CircularAxis
Sets the value of the axis
| Name | Type | Description |
|---|---|---|
val | number | The value to be displayed by the axis. |
Optional skipAnimation | boolean | If true, no animation will be displayed |
▸ setValueProperties(props): CircularAxis
Sets properties pertaining to value shape of the gauge
| Name | Type | Description |
|---|---|---|
props | ValueOptions | properties |
▸ setVisible(value): CircularAxis
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setZIndex(value): CircularAxis
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): CircularAxis
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): CircularAxis
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
▸ updateSceneTransformation(): CircularAxis
Update scene transformation
this
Axis.updateSceneTransformation
▸ updateState(regions?, changes?): CircularAxis
Update state. These methods reset node state and update state for children. this method is useful to refresh a scene graph
| 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(): CircularAxis
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
Axis.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