API / geotoolkit / gauges / axis / Axis / Axis
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
↳
Axis↳↳
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 |
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 |
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-fill-color | string | Color in CSS form |
linestyle-fill-evenoddmode | boolean | Even-odd fill mode |
linestyle-fill-fillpattern | Pattern | Pattern |
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 |
linestyle-fill-fillpattern-patternname | string | Name of this pattern for indexing |
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) |
linestyle-fill-foreground | string | Foreground color |
linestyle-fill-pattern | Pattern | Pattern |
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 |
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 |
range | Range | Range see |
scalescrollstrategy | ScaleScrollStrategy | Scale scroll strategy |
scalescrollstrategy-enabled | boolean | Enable flag |
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 | 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): Axis
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): Axis
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): Axis
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
AbstractNode.addInvalidateHandler
▸ addRegion(regions): Axis
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): Axis
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
AbstractNode.applyResponsiveStyle
▸ 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(): Axis
Removes all registered alarms
▸ cleanRegions(): Axis
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): Axis
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?): Axis
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): Axis
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): Axis
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
AbstractNode.enableEventPropagation
▸ enumerateNodes(callback, target?): void
Enumerate children nodes
| Name | Type | Description |
|---|---|---|
callback | Callback<Alarm | Region> | callback |
Optional target | QueryBuilder<any> | target |
void
INodeEnumerable.enumerateNodes
▸ execute(delegate): Axis
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: Axis) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: Axis) => 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
AbstractNode.getAnimationStyle
▸ 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
AbstractNode.getInvalidateMethod
▸ 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.
AbstractNode.getLocalTransform
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getName(): string
Returns the node name
string
The node name
▸ getNameProperties(): NameOptionsOut
Returns properties pertaining to name text
properties
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
AbstractNode.getOpacityBlendMode
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Returns properties pertaining to axis.
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
AbstractNode.getRenderingFilter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
AbstractNode.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
AbstractNode.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
AbstractNode.getSceneTransform
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTickGenerator(): TickGenerator
Returns the tick generator currently set on the 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.
AbstractNode.getWorldTransform
▸ 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?): Axis
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?): Axis
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
AbstractNode.isEventPropagationEnabled
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
AbstractNode.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>(type, source, args?): Axis
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?): Axis
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: Axis, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): Axis
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: Axis, args: EventMap[E]) => void | to be called |
this
▸ Protected onParentChanged(node): Axis
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
AbstractNode.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
▸ redraw(): Axis
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
AbstractNode.registerAnimationStyle
▸ removeAlarm(name): Axis
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): Axis
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ removeInvalidateHandler(handler): Axis
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
AbstractNode.removeInvalidateHandler
▸ render(context): void
Renders node
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
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): Axis
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): Axis
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAnimation(name): Axis
Sets the name of animation function corresponding to this axis
| Name | Type | Description |
|---|---|---|
name | string | New function name |
▸ setAnimationStyle(animationStyle): Axis
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
AbstractNode.setAnimationStyle
▸ setAnimationTime(time): Axis
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): Axis
Sets bounds of the axis
| Name | Type | Description |
|---|---|---|
bounds | Rect | bounds of axis |
▸ setClipStyle(style): Axis
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
▸ setCss(style, merge?): Axis
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): Axis
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): Axis
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
▸ setFunctionRegistry(registry): Axis
Sets function registry which will provide handlers for gauges animation and alarms
| Name | Type | Description |
|---|---|---|
registry | FunctionRegistry | New registry to set |
▸ setId(id): Axis
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLabelProperties(grade, props): Axis
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?): Axis
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
AbstractNode.setLocalTransform
▸ setMarginsStyle(margins, merge?): Axis
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): Axis
Changes the name of the axis
| Name | Type | Description |
|---|---|---|
name | string | The new axis name |
this
▸ setNameProperties(props): Axis
Sets properties pertaining to name shape of the gauge
| Name | Type | Description |
|---|---|---|
props | NameOptions | properties |
▸ setNotification(notify, force?): Axis
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?): Axis
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?): Axis
Sets properties pertaining to axis.
| Name | Type | Description |
|---|---|---|
Optional props | Options | properties |
▸ setProperty(name, value): Axis
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRange(range): Axis
Sets a new data range displayed by this axis
| Name | Type | Description |
|---|---|---|
range | RangeIn | New range to set |
▸ setRenderingFilter(filter): Axis
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
AbstractNode.setRenderingFilter
▸ setResponsiveStyle(style): Axis
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
AbstractNode.setResponsiveStyle
▸ setScaleScrollStrategy(strategy?): Axis
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
AbstractNode.setScaleScrollStrategy
▸ setSelectable(selectable): Axis
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): Axis
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): Axis
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(tg): Axis
Sets tick generator on the axis
| Name | Type | Description |
|---|---|---|
tg | TickGenerator | New tick generator |
▸ setTickProperties(grade, props): Axis
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?): Axis
Sets the current value in the range of this axis. If value does not fall into range represented by this axis, it will be set to min or max depending if it's smaller or bigger than the range
| Name | Type | Description |
|---|---|---|
val | number | New value to set |
Optional skipAnimation | boolean | If true, no animation will be displayed |
▸ setValueProperties(props): Axis
Sets properties pertaining to value shape of the gauge
| Name | Type | Description |
|---|---|---|
props | ValueOptions | properties |
▸ setVisible(value): Axis
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setZIndex(value): Axis
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): Axis
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): Axis
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
AbstractNode.unregisterAnimationStyle
▸ updateSceneTransformation(): Axis
Update scene transformation
this
AbstractNode.updateSceneTransformation
▸ updateState(regions?, changes?): Axis
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(): Axis
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
AbstractNode.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