API / geotoolkit / welllog / Log2DVisual / Log2DVisual
welllog.Log2DVisual.Log2DVisual
Defines a 2D log visual. Data is passed in an Log2DVisualData containing rows of Log2DDataRow. This visual is added to a log track to be displayed.
Log2DVisual visual can be used to display FMI logs (Acoustic/Optic borehole imaging) or density logs.
It requires to provide column base data for each depth. The provided data is organized as a table: a collection of rows and columns inside the row.
You can specify your values as in vertical or horizontal or both directions.
Please refer to tutorial Log2D Visual in Welllog.
↳
Log2DVisual
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
autoanglelimits | boolean | Auto angle model limits |
autobounds | boolean | Enables or disables auto bounds |
autoupdate | boolean | Flag for automatic update from datasource |
basename | string | The base name |
bounds | Rect | The rectangle specifying position of the visual in the track. If set, autobounds will be switched off |
bounds-height | number | Height |
bounds-readonly | boolean | Readonly |
bounds-width | number | Width |
bounds-x | number | Left |
bounds-y | number | Top |
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 | GraphicsPath | Clipping style |
colorprovider | ColorProvider | Color provider |
colorprovider-max | number | |
colorprovider-min | number | |
colorprovider-scale | KnownScales | |
columnalignment | ColumnAlignment | Specify a type of interpolation alignment of column |
columndecimation | boolean | Enable column decimation if data has more columns than width of the visual in device |
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 |
description | string | The description |
id | string | number | Id of the node, its a unique identifier |
linestyle | string | Linestyle |
linestyle | LineStyle | Linestyle |
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 |
maxangle | number | Max angle |
microposleft | number | Left micro position |
microposright | number | Right micro position |
minangle | number | Min angle |
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 |
plotmode | PlotTypes | Plot mode |
rowalignment | RowAlignment | Specify a type of interpolation alignment of row |
rowsinterpolation | InterpolationType | Specify a type of interpolation between rows |
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 |
transform | string | Additional CSS transformation applied to node or 'none' |
transform | Transformation | Additional CSS transformation applied to node or 'none' |
viewcache | boolean | True, if tiled cache is enabled for rendering |
visible | boolean | Visibility of the node, a boolean to determine if the node should be rendered or not |
webglrendering | boolean | True, if webGL is needed for rendering |
wrapinterpolation | boolean | Type of the wrap interpolation to specify how to process the edge values |
z-index | number | Define node z-index |
Constructors
• new Log2DVisual(options?, autoUpdate?)
Constructor
Throws
if the decimation strategy type is not based on the AbstractDecimationStrategy
| Name | Type | Description |
|---|---|---|
Optional options | ArrayLogDataSource | Log2DVisualData | Options | instance of log2data or object containing log visual configuration |
Optional autoUpdate | boolean | automatic update from data source |
LogAbstractVisual.constructor
Methods
▸ addCssClass(cssclass): Log2DVisual
Adds new css class to node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
▸ addInvalidateHandler(handler): Log2DVisual
Add invalidate handler
Deprecated
since 4.0, use Node.on instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogAbstractVisual.addInvalidateHandler
▸ Protected applyOpacity(context): Log2DVisual
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
LogAbstractVisual.applyOpacity
▸ Protected applyResponsiveStyle(): void
Apply a responsive style rules it is exists
void
LogAbstractVisual.applyResponsiveStyle
▸ checkCollision(context): boolean
Check culling. Returns true if object is inside of renderable area
| Name | Type | Description |
|---|---|---|
context | RenderingContext | Rendering Context |
boolean
LogAbstractVisual.checkCollision
▸ clone(): Log2DVisual
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ connectStyle(style, type, callback): Log2DVisual
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
LogAbstractVisual.connectStyle
▸ Protected copyConstructor(src, deepCopy?): Log2DVisual
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 | Log2DVisual | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
LogAbstractVisual.copyConstructor
▸ disconnectStyle(style, type, callback): Log2DVisual
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
LogAbstractVisual.disconnectStyle
▸ 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
▸ enableColumnDecimation(enable): Log2DVisual
Enable columns decimation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable / disable decimation |
this
▸ enableEventPropagation(enable): Log2DVisual
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
LogAbstractVisual.enableEventPropagation
▸ execute(delegate): Log2DVisual
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: Log2DVisual) => void | Function to execute |
The result if any or this
▸ execute<T>(delegate): T
| Name |
|---|
T |
| Name | Type |
|---|---|
delegate | (this: Log2DVisual) => 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)
▸ getAlignment(): ColumnAlignment
Return interpolation alignment
wrapInterpolation
▸ getAnglesLimits(): Range
Returns angle limits
▸ getAnimationStyle(): AnimationStyle
Return animation style
animationStyle current animation style
LogAbstractVisual.getAnimationStyle
▸ getAutoAnglesLimits(): boolean
Returns the status of the auto angle limits
boolean
▸ getBaseName(): string
Returns the base name
string
The base name
▸ getBounds(): Rect
Returns bounds in the parent coordinates
▸ getClassName(): string
string
LogAbstractVisual.getClassName
▸ getClipStyle(): ClipStyle
Gets the current clipping style
clipping style
LogAbstractVisual.getClipStyle
▸ getColorProvider(): ColorProvider
Gets color provider
IColorProviderVisual.getColorProvider
▸ getContentsTransform(): Transformation
Retrieves the world transformation of the spatial
LogAbstractVisual.getContentsTransform
▸ 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[]
LogAbstractVisual.getCssClasses
▸ getCssTransform(): string
Returns CSS transformation
string
LogAbstractVisual.getCssTransform
▸ getData(): ArrayLogDataSource | Log2DVisualData
Returns data
ArrayLogDataSource | Log2DVisualData
▸ getDataLimits(fullLimits?): Rect
| Name | Type | Description |
|---|---|---|
Optional fullLimits | boolean | flag to return a full depth limits or mining depth limits without null values |
LogAbstractVisual.getDataLimits
▸ getDecimationStrategy(): AbstractDecimationStrategy
Get decimation strategy for dense areas
▸ getDescription(): string
Gets the description
string
The description
LogAbstractVisual.getDescription
▸ getGapDistance(): number
Returns The maximum discontinuity distance to render discontinuity
number
gap distance
▸ getGapDistanceUnit(): AbstractUnit
Returns the unit of the gap distance
The gap distance unit
▸ getGapFillCutoffUnit(): AbstractUnit
Returns the unit of the cutoff used for removing NaN valued samples
The cutoff unit
▸ getGapFillCutoffValue(): number
Returns the value of the cutoff used for removing NaN valued samples
number
The cutoff value
▸ getGapUnit(): AbstractUnit
Returns the unit of the gap
The cutoff unit
▸ getGapValue(): number
Returns The maximum discontinuity allowed in depth or time
number
value
▸ getHeader(name): LogVisualHeader<Node>
Return the header registered by the name
| Name | Type | Description |
|---|---|---|
name | string | header name |
header
▸ getHeaders(): Record<string, LogVisualHeader<Node>>
Return an object that contains all headers registered with the visual
Record<string, LogVisualHeader<Node>>
headers
▸ 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
LogAbstractVisual.getInvalidateMethod
▸ getLineStyle(): LineStyle
Returns line style
LogAbstractVisual.getLineStyle
▸ getLocalTransform(): Transformation
Retrieves the transformation of bounds to parent
transform the local transform.
LogAbstractVisual.getLocalTransform
▸ getMarginsStyle(): SpaceStyle<string | number>
Return margins style
SpaceStyle<string | number>
LogAbstractVisual.getMarginsStyle
▸ getMaxDepth(): number
Returns maximum depth of the data set
number
▸ getMicroPositionLeft(): number
Returns micro position left
number
LogAbstractVisual.getMicroPositionLeft
▸ getMicroPositionRight(): number
Returns micro position right
number
LogAbstractVisual.getMicroPositionRight
▸ Protected getMicroPositionTransformation(): Transformation
Returns micro position transformation
micro position transformation
LogAbstractVisual.getMicroPositionTransformation
▸ getMinDepth(): number
Returns minimum depth of the data set
number
▸ getModelLimits(): Rect
Returns parent model limits
LogAbstractVisual.getModelLimits
▸ getName(): string
Returns the node name
string
The node name
▸ getOffsets(): number | number[]
Returns the offset of data
number | number[]
offset array of the same size as data set
▸ getOpacity(): number
Returns current node opacity
number
opacity
▸ getOpacityBlendMode(): BlendMode
Returns current node opacity
opacity blend mode
LogAbstractVisual.getOpacityBlendMode
▸ getParent(): Node
Return parent node
parent node
▸ getPlotType(): string
Gets plot type
string
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties object
LogAbstractVisual.getProperties
▸ 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[]
LogAbstractVisual.getPropertyKeys
▸ getRenderingFilter(): IFilter
Return filter to be used for rendering and picking
current filter
LogAbstractVisual.getRenderingFilter
▸ getResponsiveStyle(): ResponsiveStyle
Return responsive style
LogAbstractVisual.getResponsiveStyle
▸ getRoot(): Node
Returns root node.
If node doesn't have parent then it returns itself.
the root node
▸ getRowAlignment(): RowAlignment
Return interpolation alignment
row alignment
▸ getRowsInterpolation(): InterpolationType
Returns type of interpolation for rows values
interpolation
▸ getScaleScrollStrategy(): Delegate
Gets scale scroll strategy
scale scroll strategy
LogAbstractVisual.getScaleScrollStrategy
▸ getSceneTransform(): Transformation
Returns transformation from node to root scene
a transformation from node to root scene
LogAbstractVisual.getSceneTransform
▸ getTag(): any
Returns the object associated with the node by user.
any
The node's user-object
▸ getTrack(): ITrack
Returns parent track if LogTrack
▸ getVisible(): boolean
Return visibility of the node
boolean
true if node is visible
▸ getWebGLRendering(): boolean
Gets webGL rendering
boolean
true, if webGL is used for rendering
▸ getWorldTransform(): Transformation
Retrieves the world transformation of the node to transform model coordinates to the parent track
LogAbstractVisual.getWorldTransform
▸ getWrapInterpolation(): boolean
Return wrap interpolation
boolean
wrapInterpolation
▸ 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
LogAbstractVisual.hasEventListener
▸ hitTest(area, radius?): Hits
Hit test in the device coordinates
| Name | Type | Description |
|---|---|---|
area | Point | Rect | model area or position |
Optional radius | number | radius of selection |
hit test result
▸ invalidate(bounds?, force?): Log2DVisual
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
▸ invalidateParent(bounds?, force?): Log2DVisual
Invalidate bounds
| Name | Type | Description |
|---|---|---|
Optional bounds | Rect | model bounds |
Optional force | boolean | force if null is provided then cache (if any will be completely refreshed) otherwise only specified rect or node.bounds will be refreshed |
this
LogAbstractVisual.invalidateParent
▸ isAutoBounds(): boolean
Returns auto bounds value
boolean
LogAbstractVisual.isAutoBounds
▸ isColumnDecimationEnabled(): boolean
Returns if column decimation is enabled
boolean
status if it is enabled
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isEventPropagationEnabled(): boolean
Return true if event propagation is enabled from child to parent
boolean
LogAbstractVisual.isEventPropagationEnabled
▸ isHorizontalFlip(): boolean
Return true if the representation is flipped horizontally
boolean
horizontal flip
LogAbstractVisual.isHorizontalFlip
▸ isNotificationEnabled(): boolean
return state of notification
boolean
current notification state
LogAbstractVisual.isNotificationEnabled
▸ isSelectable(): boolean
Returns true if node can be picked/selected.
boolean
The selectable flag
LogAbstractVisual.isSelectable
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ notify<E>(type, source, args?): Log2DVisual
Notify listeners of the Node
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event |
source | LogAbstractVisual | source who called the event |
Optional args | EventMap[E] | event arguments |
this
▸ off<E>(type?, callback?): Log2DVisual
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: Log2DVisual, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): Log2DVisual
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: Log2DVisual, args: EventMap[E]) => void | to be called |
this
▸ Protected onHeaderSet(name, headerInstance, silent?): void
This method is called if header is set. Send event Events.HeaderSet
| Name | Type | Description |
|---|---|---|
name | string | of the container. The 'header' and 'footer' is used. |
headerInstance | LogVisualHeader<Node> | the header instance |
Optional silent | boolean | silent node to avoid sending events that header is created |
void
▸ Protected onMicroPositionChanged(): Log2DVisual
calls when microPosition has been changed
this
LogAbstractVisual.onMicroPositionChanged
▸ Protected onParentChanged(node): Log2DVisual
This method is called when parent changes. Do not call it directly.
| Name | Type | Description |
|---|---|---|
node | Node | node to change parent |
this
LogAbstractVisual.onParentChanged
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
LogAbstractVisual.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
LogAbstractVisual.postRendering
▸ 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
LogAbstractVisual.preRendering
▸ registerAnimationStyle(root): void
Register animation style.
| Name | Type | Description |
|---|---|---|
root | Node | root node for node |
void
LogAbstractVisual.registerAnimationStyle
▸ removeCssClass(cssclass): Log2DVisual
Removes css class from node
| Name | Type | Description |
|---|---|---|
cssclass | string | string[] | css class name('s) |
this
LogAbstractVisual.removeCssClass
▸ removeInvalidateHandler(handler): Log2DVisual
Remove invalidate handler
Deprecated
since 4.0, use Node.off instead
| Name | Type | Description |
|---|---|---|
handler | Function | handler to be notified about invalidation |
this
LogAbstractVisual.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
▸ Protected renderContent(context): void
Renders node content
| Name | Type | Description |
|---|---|---|
context | RenderingContext | The rendering context to be used to draw the node |
void
LogAbstractVisual.renderContent
▸ Protected requestData(range, scale, callback?): void
| Name | Type |
|---|---|
range | Range |
scale | number |
Optional callback | () => void |
void
▸ rotate(theta, x, y): Log2DVisual
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): Log2DVisual
Scale node
| Name | Type | Description |
|---|---|---|
xx | number | x scale factor |
yy | number | y scale factor |
this
▸ setAlignment(alignment): Log2DVisual
Set interpolation alignment
| Name | Type | Description |
|---|---|---|
alignment | ColumnAlignment | alignment of column |
this
▸ setAnglesLimits(left, right): Log2DVisual
Sets angles limits of the data. By default it is from 0 to 2*PI
| Name | Type | Description |
|---|---|---|
left | number | left angle in radians |
right | number | right angle in radians |
▸ setAnimationStyle(animationStyle): Log2DVisual
Sets animation style
| Name | Type | Description |
|---|---|---|
animationStyle | Type | animation style |
LogAbstractVisual.setAnimationStyle
▸ setAutoAnglesLimits(enable): Log2DVisual
Enable / disable usage limits from data. By default automatic limit is disabled
| Name | Type | Description |
|---|---|---|
enable | boolean | enable or disable usage data limits |
▸ setAutoBounds(enable): Log2DVisual
Enables or disables auto bounds. If auto bounds is enabled then it equals to parent model limits
| Name | Type | Description |
|---|---|---|
enable | boolean | Enables or disables auto bounds |
this
LogAbstractVisual.setAutoBounds
▸ setBaseName(name): Log2DVisual
Sets base name of the visual
| Name | Type | Description |
|---|---|---|
name | string | The base name |
this
▸ setBounds(bounds): Log2DVisual
Sets bounds of the visual in the parent coordinates and sets up auto bounds to false
| Name | Type | Description |
|---|---|---|
bounds | Rect | the rectangle specifying position of the visual in the track. |
this
▸ setClipStyle(style): Log2DVisual
Sets a new clipping style
| Name | Type | Description |
|---|---|---|
style | GraphicsPath | ClipStyle | Options | a new clipping style |
this
LogAbstractVisual.setClipStyle
▸ setColorProvider(colorProvider?): Log2DVisual
Sets color provider
| Name | Type | Description |
|---|---|---|
Optional colorProvider | ColorProvider | { type?: string } | the color provider |
▸ setCss(style, merge?): Log2DVisual
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): Log2DVisual
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): Log2DVisual
Set CSS transformation
| Name | Type | Description |
|---|---|---|
transform | string | Transformation | transformation css transformation instruction or Transformation instance |
this
LogAbstractVisual.setCssTransform
▸ setData(data, autoUpdate?): Log2DVisual
Sets data
| Name | Type | Description |
|---|---|---|
data | DataInfo | instance of log2data |
Optional autoUpdate | boolean | automatic update from data source |
this
▸ setDecimationStrategy(decimationStrategy): Log2DVisual
Set decimation strategy for dense areas
Throws
if the decimation strategy is null or its type is not based on the AbstractDecimationStrategy
| Name | Type | Description |
|---|---|---|
decimationStrategy | AbstractDecimationStrategy | new decimation strategy |
▸ setDescription(description): Log2DVisual
Sets the description
| Name | Type | Description |
|---|---|---|
description | string | The visual description |
this
LogAbstractVisual.setDescription
▸ setGapDistance(distance, merge?): Log2DVisual
Set the value of the gap distance. Discontinuity will be rendered in specified distance, use gap value if distance is not specified or NaN
| Name | Type | Description |
|---|---|---|
distance | number | The maximum distance to render discontinuity allowed in depth or time |
Optional merge | boolean | true if you want to convert new value to existing unit |
this
▸ setGapDistanceUnit(unit): Log2DVisual
Sets the unit of the gap distance to show discontinuity in sample when the cutoff value is non zero and the unit is convertible to the index unit. If unit is not specified then curve index unit is used. if a depth or time interval is less than specified cutoff value then interval is connected and NaN values between are removed.
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | The unit |
this
▸ setGapFillCutoffUnit(unit): Log2DVisual
Sets the unit of the cutoff used for removing NaN valued samples. Gaps will only be 'filled' when the cutoff value is non zero and the unit is convertible to the index unit. If unit is not specified then curve index unit is used. if a depth or time interval is less than specified cutoff value then interval is connected and NaN values between are removed.
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | The unit or unit symbol to use for the gap fill cutoff |
this
▸ setGapFillCutoffValue(cutoff, merge?): Log2DVisual
Sets the value of the cutoff used for removing NaN valued samples. Gaps will only be 'filled' when the cutoff value is non zero and the unit is convertible to the index unit.
| Name | Type | Description |
|---|---|---|
cutoff | string | number | The cutoff value. When non zero and a matching unit is set |
Optional merge | boolean | true if you want to convert new value to existing unit |
this
▸ setGapUnit(unit): Log2DVisual
Sets the unit of the gap to show discontinuity in sample when the cutoff value is non zero and the unit is convertible to the index unit. If unit is not specified then curve index unit is used. if a depth or time interval is less than specified cutoff value then interval is connected and NaN values between are removed.
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | The unit |
this
▸ setGapValue(value, merge?): Log2DVisual
Set the value of the gap. Value will be used to disconnect the sample if the distance between two samples in depth or time is more than specified value
| Name | Type | Description |
|---|---|---|
value | string | number | The maximum discontinuity allowed in depth or time |
Optional merge | boolean | true if you want to convert new value to existing unit |
this
▸ setHeader(name, headerInstance, silent?): Log2DVisual
Sets header instance with specified name. This name usually defines header or footer.
Throws
if header name is null
| Name | Type | Description |
|---|---|---|
name | string | of the container. The 'header' and 'footer' is used. |
headerInstance | LogVisualHeader<Node> | the header instance |
Optional silent | boolean | silent node to avoid sending events that header is created |
this
▸ setHorizontalFlip(enable): Log2DVisual
Set horizontal flip of the representation
| Name | Type | Description |
|---|---|---|
enable | boolean | enable flip |
this
▸ setId(id): Log2DVisual
Allows the user to associate any identifier
| Name | Type | Description |
|---|---|---|
id | string | number | object id |
this
▸ setLineStyle(lineStyle, merge?): Log2DVisual
Sets line style
| Name | Type | Description |
|---|---|---|
lineStyle | Type | The style in which the line is displayed object can be in format of constructor of LineStyle |
Optional merge | boolean | true if you want to merge lineStyle with existing attribute, false by default |
this
LogAbstractVisual.setLineStyle
▸ setLocalTransform(localTransform, force?): Log2DVisual
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
LogAbstractVisual.setLocalTransform
▸ setMarginsStyle(margins, merge?): Log2DVisual
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
LogAbstractVisual.setMarginsStyle
▸ setMicroPosition(left, right): Log2DVisual
Sets micro position (0 - 1). It allows application code to display the visual in a subarea of the track.
By default log visuals uses all space of the trace in the horizontal direction, but micro position allows to place log visual in the specified position of the track in horizontal direction. See example below
Example
// The following code places curve 20% from left and 20% from right.
curve.setMicroPosition(0.2,0.8);| Name | Type | Description |
|---|---|---|
left | number | left position |
right | number | right position |
this
LogAbstractVisual.setMicroPosition
▸ setName(name): Log2DVisual
Sets name of the node
| Name | Type | Description |
|---|---|---|
name | string | The node name |
this
▸ setNotification(notify, force?): Log2DVisual
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
LogAbstractVisual.setNotification
▸ setOffsets(offsets): Log2DVisual
Sets the offset of data
Example
// following example shows how to use setOffsets() method to rotate Log2DVisual
let degreesToRadians = function(degrees){
return degrees * Math.PI / 180;
};
function createOffsets (data, offset) {
let offsets = [];
for (let i = 0; i < data.getRows().length; i++)
offsets.push(offset);
return offsets;
}
log2dVisual.setOffsets(createOffsets(log2d.getData(), degreesToRadians(val)));| Name | Type | Description |
|---|---|---|
offsets | number | number[] | array of the same size as data set |
▸ setOpacity(opacity, blendMode?): Log2DVisual
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
▸ setPlotType(mode): Log2DVisual
Sets Plot type to specify linear o step interpolation of values in columns
In linear interpolation mode it interpolates value from the previous column to the end of the current column and the first column is ignored, which can be represented as end of the sector if consider each column as a sector. if it is necessary to start from beginning of the sector or in the middle then you can specify offset equal to the first column angle or the half the first column angle.
| Name | Type | Description |
|---|---|---|
mode | string | plot types (step plot mode or linear plot mode) to be used for interpolation |
▸ setProperties(properties?): Log2DVisual
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
LogAbstractVisual.setProperties
▸ setProperty(name, value): Log2DVisual
Sets dynamic property by name
| Name | Type | Description |
|---|---|---|
name | string | property name |
value | any | property value |
this
▸ setRenderingFilter(filter): Log2DVisual
Sets filter to be applied before rendering and picking
| Name | Type | Description |
|---|---|---|
filter | IFilter | filter to set |
this
LogAbstractVisual.setRenderingFilter
▸ setResponsiveStyle(style): Log2DVisual
Sets responsive style.
| Name | Type | Description |
|---|---|---|
style | Options | ResponsiveStyle | responsive style |
this
LogAbstractVisual.setResponsiveStyle
▸ setRowAlignment(alignment): Log2DVisual
Set interpolation alignment
| Name | Type | Description |
|---|---|---|
alignment | RowAlignment | alignment of row |
this
▸ setRowsInterpolation(interpolation): Log2DVisual
Set type of interpolation for rows values
| Name | Type | Description |
|---|---|---|
interpolation | InterpolationType | specify a type of interpolation between rows |
this
▸ setScaleScrollStrategy(strategy?): Log2DVisual
Sets scale scroll strategy
| Name | Type | Description |
|---|---|---|
Optional strategy | Delegate | scale scroll strategy |
this
LogAbstractVisual.setScaleScrollStrategy
▸ setSelectable(selectable): Log2DVisual
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
LogAbstractVisual.setSelectable
▸ setSilent(bool): Log2DVisual
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setTag(tag): Log2DVisual
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
▸ setVisible(value): Log2DVisual
Sets visibility of the node. Send event Events.VisibilityChanged
| Name | Type | Description |
|---|---|---|
value | boolean | flag specifying visibility of the node |
this
▸ setWebGLRendering(webglEnabled): Log2DVisual
Sets webGL rendering
| Name | Type | Description |
|---|---|---|
webglEnabled | boolean | true, if webGL is needed for rendering |
this
▸ setWrapInterpolation(wrapInterpolation): Log2DVisual
Set wrap interpolation
| Name | Type | Description |
|---|---|---|
wrapInterpolation | boolean | type of the wrap interpolation to specify how to process the edge values |
this
▸ setZIndex(value): Log2DVisual
Sets z-index for node (set null for default)
| Name | Type | Description |
|---|---|---|
value | number | index determining node z-position |
this
▸ shear(shx, shy): Log2DVisual
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): Log2DVisual
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
LogAbstractVisual.unregisterAnimationStyle
▸ updateSceneTransformation(): Log2DVisual
Update scene transformation
this
LogAbstractVisual.updateSceneTransformation
▸ updateState(regions?, changes?): Log2DVisual
Update state.
| Name | Type | Description |
|---|---|---|
Optional regions | Rect[] | optional array to return invalid rectangles |
Optional changes | StateChanges | optional parameter to specify a reason of changes |
this
▸ Protected updateTimeStamp(): Log2DVisual
Update time stamp to indicate that Node or Children has been changed.
this
LogAbstractVisual.updateTimeStamp
▸ Static enableSceneGraphNotification(enabled): void
Enable / disable all notifications
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets if this object sends notifications |
void
LogAbstractVisual.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
LogAbstractVisual.getClassName
▸ Static isSceneGraphNotificationEnabled(): boolean
Return status of the global notification for all nodes.
boolean