API / geotoolkit / charts / Axis / Axis
Axis shape that is able to connect with AbstractChart to create model space and labels
Example
import {Axis} from '@int/geotoolkit/charts/Axis';
const axis = new Axis({
'dimension': {
'neatlimits': true // use 'neatlimits' instead of precise data limits
},
'min': 1, // fix axis 'min' value
'grid': {
'visible': false // hide connected grid
}
});↳
Axis
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
crosshair | LabelSettings | Crosshair tool settings for custom crosshair modes (e.g. in polar system) |
crosshair-alignment | AnchorType | Alignment of the text |
crosshair-cssclass | string | The css class name of this node |
crosshair-displaymode | LabelDisplayMode | Label display mode, default is LabelDisplayMode.Shape |
crosshair-fillstyle | string | Fill style of the text |
crosshair-fillstyle | FillStyle | Fill style of the text |
crosshair-fillstyle-color | string | Color in CSS form |
crosshair-fillstyle-evenoddmode | boolean | Even-odd fill mode |
crosshair-fillstyle-fillpattern | Pattern | Pattern |
crosshair-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 |
crosshair-fillstyle-fillpattern-patternname | string | Name of this pattern for indexing |
crosshair-fillstyle-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
crosshair-fillstyle-foreground | string | Foreground color |
crosshair-fillstyle-pattern | Pattern | Pattern |
crosshair-linestyle | string | Line style of the text border |
crosshair-linestyle | LineStyle | Line style of the text border |
crosshair-linestyle-color | string | Color in CSS form |
crosshair-linestyle-fill | string | Optional fill style to be used to fill lines generated with this style |
crosshair-linestyle-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
crosshair-linestyle-linecap | CapStyle | The line cap style |
crosshair-linestyle-linedashoffset | number | Line dash offset of dashed line |
crosshair-linestyle-linejoin | JoinStyle | The line join style |
crosshair-linestyle-pixelsnapmode | boolean | Pixel Snap Mode, default( |
crosshair-linestyle-scalable | boolean | True if width should depend on transformation |
crosshair-linestyle-unit | string | Optional unit for the width |
crosshair-linestyle-width | number | string | The line thickness |
crosshair-offset | number | string | Label offset between the text and cross-hair cursor, use padding in case of undefined |
crosshair-padding | number | |
crosshair-paddingstyle | number | string | Padding style between the text and the border |
crosshair-radius | number | Radius of the text shape border |
crosshair-textstyle | string | Text style of the text |
crosshair-textstyle | TextStyle | Text style of the text |
crosshair-textstyle-alignment | AlignmentStyle | Alignment |
crosshair-textstyle-autosize | boolean | Auto font size on high definition display |
crosshair-textstyle-background | string | Background style |
crosshair-textstyle-background | FillStyle | Background style |
crosshair-textstyle-baseline | BaseLineStyle | Base line |
crosshair-textstyle-color | string | Color in CSS form |
crosshair-textstyle-fill | FillStyle | Text fill style |
crosshair-textstyle-font | string | Font see |
crosshair-textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
crosshair-textstyle-lineheight | string | number | Line height |
crosshair-textstyle-multiline | boolean | Allow multi-line text |
crosshair-textstyle-outline | string | Outline style |
crosshair-textstyle-outline | LineStyle | Outline style |
crosshair-textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
crosshair-textstyle-strikethrough | string | Strikethrough style |
crosshair-textstyle-strikethrough | LineStyle | Strikethrough style |
crosshair-textstyle-textoverflow | TextOverflowStyle | Text overflow |
crosshair-textstyle-underline | string | Underline style |
crosshair-textstyle-underline | LineStyle | Underline style |
crosshair-textstyle-underlineoffset | string | number | Underline offset distance |
crosshair-textstyle-whitespace | WhiteSpaceStyle | White space |
crosshair-textstyle-wordbreak | WordBreakStyle | Word break |
crosshair-tooltip | Properties | Tooltip properties, this options applyes only in case if displaymode:LabelDisplayMode.DivElement |
crosshair-tooltip-alignment | AnchorType | Tooltip alignment according to the point set by offsets |
crosshair-tooltip-autoflip | boolean | True to automatically flip tooltip alignment if it doesn't fit the window |
crosshair-tooltip-cssclasses | string | CSS classes' names to be applied for tooltip 'cg-tooltip' by default |
crosshair-tooltip-delay | number | |
crosshair-tooltip-hidedelay | number | Auto hide in millisecond, 0 means false and autohide is disabled |
crosshair-tooltip-offsetx | number | Offset of tooltip from current position by x in pixels |
crosshair-tooltip-offsety | number | Offset of tooltip from current position by y in pixels |
crosshair-tooltip-orientation | Orientation | Tooltip orientation |
crosshair-tooltip-showdelay | number | Delay between displaying tooltip, 0 means false and tooltip shows immediately |
crosshair-tooltip-size | Range | Client size range |
crosshair-tooltip-size-high | number | Upper range boundary |
crosshair-tooltip-size-low | number | Lower range boundary |
crosshair-tooltip-size-max | number | |
crosshair-tooltip-size-min | number | |
crosshair-visible | boolean | Visibility of the text |
crosshair-z-index | number | Define node z-index |
datalimits | boolean | True to adjust limits & color provider based on connected charts data, false to use fixed limits from the color provider (true by default) |
datatype | DataType | Data type for model values conversion |
flip | boolean | True to flip axis limits (connected charts will be flipped as well) |
grid | Grid | Options for grid connected to the axis |
grid-cssclass | string | The css class name of this node |
grid-htg | TickGenerator | Horizontal tick generator |
grid-htg-labelstyles | TextStyle | An object containing label style for specified grades |
grid-htg-tag | any | Tag user can specify info associated with current object |
grid-htg-tickstyles | LineStyle | An object containing tick styles for specified grades |
grid-id | string | number | Id of the node, its a unique identifier |
grid-infinity | boolean | Infinity mode flag |
grid-name | string | Name of the node. It is often used for debugging purposes or to simplify queries |
grid-selectable | boolean | Selectable node, a boolean to determine if selection should consider this node |
grid-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 |
grid-visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
grid-vtg | TickGenerator | Vertical tick generator |
grid-z-index | number | Define node z-index |
labels | string | Labels array to display on integer ticks positions or data series identifier for it |
labelstyle | string | Tick label text style |
labelstyle | TextStyle | Tick label text style |
location | AnnotationLocation | Axis location |
max | number | Axis maximum limit |
min | number | Axis minimum limit |
size | number | Device size for the axis |
tickgenerator | TickGenerator | Tick generator |
tickstyle | string | Style for all tick lines |
tickstyle | LineStyle | Style for all tick lines |
Constructors
• new Axis(options?)
Created axis
| Name | Type | Description |
|---|---|---|
Optional options | Options | options to create axis |
AxisAxis.constructor
Methods
▸ 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
▸ 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
▸ checkCollision(context): boolean
Check culling
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
true if object is inside of rendarable area
▸ clone(): Axis
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 | Axis | 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.
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
▸ 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)
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
▸ getAutoLabelRotation(): boolean
Get auto label rotation
boolean
▸ getAutoLabelRotationAngle(): number
Gets auto rotation angle for vertical axis
number
angle
Axis.getAutoLabelRotationAngle
▸ getAxisDimension(): AxisMappingDimension
Gets axis dimension to synchronize tick generator parameters with external source
▸ getBaseLineStyle(): LineStyle
Return a base line style
▸ getBaseLineVisible(): boolean
Return base line visibility
boolean
▸ getBounds(): Rect
Gets axis bounds
axis bounds
▸ getClassName(): string
string
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
▸ getContentsTransform(): Transformation
Transformation of inner contents to bounds
▸ getCrossHairAlignment(): AnchorType
Returns alignment for custom crosshair tool label
▸ getCrossHairFillStyle(): FillStyle
Returns fillstyle for custom crosshair tool label
▸ getCrossHairLineStyle(): LineStyle
Returns linestyle for custom crosshair tool label
▸ getCrossHairOffset(): SpaceStyle<string | number>
Returns offset for custom crosshair tool label
SpaceStyle<string | number>
▸ getCrossHairTextConverter(): TextConverter
Returns text converter callback for custom crosshair tool
▸ getCrossHairTextStyle(): TextStyle
Returns textstyle for custom crosshair tool label
▸ 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
▸ getDataType(): DataType
Returns type of the axis data
▸ getFillStyle(): FillStyle
Return fill style
fillStyle current fill style
▸ getGrid(): Grid
Returns grid connected to the axis (if exists, null otherwise)
▸ getHideOverlappedText(): boolean
Gets hide overlapped text flag
boolean
hide overlapped text flag
▸ getId(): string | number
Returns the associated identifier of the node
string | number
The node's id
▸ getInfiniteMode(): boolean
Return infinity mode flag
boolean
flag
▸ Protected getInvalidateMethod(): AttributeCallback<EventDispatcher>
Gets invalidate method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getLabelManualSettings(): boolean
Gets label manual settings mode (AnchorType and no shifts)
boolean
label manual settings mode
▸ getLabelOffset(): number
Return the label offset
number
▸ getLabelPadding(): number
Gets label padding
number
padding label padding
▸ getLabelPosition(): LabelPosition
Return the label position
▸ getLayoutStyle(): LayoutStyle<string | number>
return desired layout style
LayoutStyle<string | number>
▸ getLineStyle(): LineStyle
Return line style
lineStyle current line style
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
▸ getMax(): number
Returns current maximum axis limit if set, null otherwise
number
▸ getMaximumLabelSize(): number
Gets maximum label size
number
maximum label size (in device space)
▸ getMin(): number
Returns current minimum axis limit if set, null otherwise
number
▸ getModelLimits(): Rect
Gets model limits
model limits
▸ getName(): string
Returns the node name
string
The node name
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
▸ getOrientation(): Orientation
Return axis orientation
"horizontal" or "vertical"
▸ getParent(): Node
Return parent node
parent node
▸ getProperties(): OptionsOut
Returns properties
▸ getProperty(name): any
Gets dynamic property by name. These properties can be used as a property bags
| Name | Type | Description |
|---|---|---|
name | string | property name |
any
▸ getPropertyKeys(): string[]
Returns known properties keys
string[]
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
▸ getShowTitleEllipsis(): boolean
Return boolean flag that enables/disables ellipsis in case if text is too long
boolean
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTextStyle(): TextStyle
Return a text style
textStyle
▸ getTickGenerator(): TickGenerator
Return a current tick generator
a current tick generator
▸ getTickInfo(): TickInfo
Returns axis tick info
tickInfo
▸ getTickPosition(): string
Return tick position
string
tickPosition
▸ getTitle(): string
Get axis title
string
axis title
▸ getTitleAnchor(): AnchorType
Get title anchor
alignment
▸ getTitleMargin(): SpaceStyle<string | number>
Returns title margin
SpaceStyle<string | number>
▸ getTitleOffset(): Point
Returns title offset
offset
▸ getTitleTextStyle(): TextStyle
The style associated with this axis title.
textStyle
▸ getTitleVisible(): boolean
Get title visibility state
boolean
visible state
▸ getType(): AxisType
Returns axis type
▸ 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.
▸ 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
▸ invalidateLayout(): Axis
Notify that layout is invalidated. Send event Events.LayoutInvalidated
this
▸ invalidateParent(bounds?, force?): Axis
Invalidate parent area
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | area to invalidate |
Optional force | boolean | force |
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
▸ isFlip(): boolean
Returns true if axis limits are flipped, false otherwise
boolean
▸ 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?): 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 onAxisDimensionChanged(dimension): void
Called if axis dimension is changed
| Name | Type | Description |
|---|---|---|
dimension | AxisMappingDimension | dimension |
void
▸ 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
▸ 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
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
▸ 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
▸ 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
▸ setAllLabelStyle(style): Axis
Sets axis tick labels text style for all grades
| Name | Type | Description |
|---|---|---|
style | Type | tick label text style |
this
▸ setAllTickStyle(style): Axis
Sets axis tick lines style for all grades
| Name | Type | Description |
|---|---|---|
style | Type | tick lines style |
this
▸ setAnimationStyle(animationStyle): Axis
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
▸ setAutoLabelRotation(enable): Axis
Set auto label rotation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable automatic label rotation |
this
▸ setAutoLabelRotationAngle(angle): Axis
Sets auto rotation angle for vertical axis
| Name | Type | Description |
|---|---|---|
angle | number | angle of label auto rotation |
this
Axis.setAutoLabelRotationAngle
▸ setAxisDimension(dimension): Axis
Sets axis dimension to synchronize tick generator parameters with external source
| Name | Type | Description |
|---|---|---|
dimension | AxisMappingDimension | Options | dimension |
▸ setBaseLineStyle(lineStyle, merge?): Axis
Sets a base line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setBaseLineVisible(visible): Axis
Set base line visibility
| Name | Type | Description |
|---|---|---|
visible | boolean | visible |
▸ setBounds(bounds): Axis
Sets an axis bounds
| Name | Type | Description |
|---|---|---|
bounds | Rect | axis bounds |
this
▸ 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
▸ setDataType(dataType): Axis
Set axis data type
| Name | Type | Description |
|---|---|---|
dataType | DataType | new data type |
▸ setFillStyle(fillStyle, merge?): Axis
Sets fill style
| Name | Type | Description |
|---|---|---|
fillStyle | Type | a new fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
this
▸ setHideOverlappedText(flag): Axis
Sets hide overlapped text flag
| Name | Type | Description |
|---|---|---|
flag | boolean | hide overlapped text flag |
this
▸ setId(id): Axis
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setInfiniteMode(infinityMode): Axis
Set infinity mode flag to draw axis outside the model limits
| Name | Type | Description |
|---|---|---|
infinityMode | boolean | infinity mode flag |
this
▸ setLabelManualSettings(state): Axis
Sets label manual settings mode (AnchorType and no shifts)
| Name | Type | Description |
|---|---|---|
state | boolean | label manual settings mode |
this
▸ setLabelOffset(offset): Axis
Sets the label offset
| Name | Type | Description |
|---|---|---|
offset | number | the label offset |
this
▸ setLabelPadding(padding): Axis
Sets label padding
| Name | Type | Description |
|---|---|---|
padding | number | label padding |
this
▸ setLabelPosition(position): Axis
Sets the label position
| Name | Type | Description |
|---|---|---|
position | LabelPosition | label position |
this
▸ setLayoutStyle(layoutStyle, merge?): Axis
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 |
▸ setLineStyle(lineStyle, merge?): Axis
Sets line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | line style or options |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
▸ setLocalTransform(localTransform, force?): 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
▸ 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
▸ setMaximumLabelSize(maximumLabelSize): Axis
Sets maximum label size
| Name | Type | Description |
|---|---|---|
maximumLabelSize | number | maximum label size (in device space) |
this
▸ setModelLimits(modelLimits): Axis
Sets model limits
| Name | Type | Description |
|---|---|---|
modelLimits | Rect | model limits or rectangle where ticks are to be generated |
this
▸ setName(name): Axis
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ 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
▸ setOrientation(orientation): Axis
Sets axis orientation
| Name | Type | Description |
|---|---|---|
orientation | string | (It can be "Vertical" or "Horizontal"); |
this
▸ setProperties(options?): Axis
Sets axis properties
| Name | Type | Description |
|---|---|---|
Optional options | Options | axis options |
this
▸ setProperty(name, value): Axis
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): Axis
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
▸ setResponsiveStyle(style): Axis
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
▸ setScaleScrollStrategy(strategy?): Axis
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
▸ 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
▸ setShowTitleEllipsis(showellipsis): Axis
Enables/disables ellipsis in case if text is too long
| Name | Type | Description |
|---|---|---|
showellipsis | boolean | true for ellipsis |
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
▸ setTextStyle(textStyle, merge?): Axis
Set text style
| Name | Type | Description |
|---|---|---|
textStyle | Type | a new shape text style |
Optional merge | boolean | true if you want to merge textStyle with existing attribute, false by default |
this
▸ setTickGenerator(tickGenerator): Axis
Sets tick generator
| Name | Type | Description |
|---|---|---|
tickGenerator | TickGenerator | Options | a tick generator to be used |
this
▸ setTickPosition(position): Axis
Sets tick position as text
| Name | Type |
|---|---|
position | string |
▸ setTitle(title): Axis
Set title
| Name | Type | Description |
|---|---|---|
title | string | Title | axis title text or title object |
this
▸ setTitleAnchor(titleAnchor): Axis
Set title alignment
| Name | Type | Description |
|---|---|---|
titleAnchor | AnchorType | anchor |
▸ setTitleMargin(titleMargin, merge?): Axis
Sets title margin
| Name | Type | Description |
|---|---|---|
titleMargin | Type<string | number> | title margin style |
Optional merge | boolean | true if you want to merge paddingStyle with existing attribute, false by default |
this
▸ setTitleOffset(titleOffset): Axis
Sets title offset
▸ setTitleText(titleText): Axis
Sets title text
| Name | Type | Description |
|---|---|---|
titleText | string | title text |
this
▸ setTitleTextStyle(titleTextStyle, merge?): Axis
Set axis title text style
| Name | Type | Description |
|---|---|---|
titleTextStyle | Type | a new title text style |
Optional merge | boolean | true if you want to merge textStyle with existing attribute, false by default |
this
▸ setTitleVisible(visible): Axis
Set title visibility state
| Name | Type | Description |
|---|---|---|
visible | boolean | visible title |
▸ 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
▸ updateAxisDimension(minValue, maxValue, size?): Axis
Update axis dimension for new data limits and optional device size of the axis
| Name | Type | Description |
|---|---|---|
minValue | number | minimum value |
maxValue | number | maximum value |
Optional size | number | size of the axis in device space. if size is not provided then size is calculated based on limits and current transformation. |
this
▸ updateSceneTransformation(): Axis
Update scene transformation
this
Axis.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
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 intersectsBounds(bounds, localTransformation, parentInvalidArea, expand?): boolean
Check collision of the shape bounds with parent invalid area
| Name | Type | Description |
|---|---|---|
bounds | Rect | shape bounds |
localTransformation | Transformation | local transformation of the bounds |
parentInvalidArea | Rect | invalid parent area |
Optional expand | Dimension | optional expand the bounds in model coordinate |
boolean
true if bounds intersect the invalid area
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean