API / geotoolkit / welllog / data / AccumulationCycleData / AccumulationCycleData
data.AccumulationCycleData.AccumulationCycleData
Define data for AccumulationCycle visual
Example
const data1 = new AccumulationCycleData('AccumulationCycle', depths, values);
const data2 = new AccumulationCycleData({
'depths': depths,
'values': values,
'name': 'AccumulationCycle'
});↳
AccumulationCycleData
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
name | string | The log data name |
Constructors
• new AccumulationCycleData(name?, depth?, values?, fillStyles?, titles?)
Constructor
| Name | Type | Description |
|---|---|---|
Optional name | string | Options | data name, or object |
Optional depth | number[] | array of depth values |
Optional values | number[] | array of values |
Optional fillStyles | Type[] | array of colors |
Optional titles | string[] | array of titles |
LogAbstractData.constructor
Methods
▸ addValue(depth, value, fillStyle): void
Add values
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
value | number | value at the specified depth |
fillStyle | Type | fillstyle at the specified depth |
void
▸ addValues(depths, values, fillStyles): void
Add values at the bottom of the log
| Name | Type | Description |
|---|---|---|
depths | number[] | The array of ordered depths |
values | number[] | The array of values |
fillStyles | Type[] | The array of fill styles |
void
▸ calculateNeatLimits(logScale, centerOnZeroOnNegativeMin, displayUnit): number[]
Return an array of neat min and max
| Name | Type | Description |
|---|---|---|
logScale | boolean | scale log scale |
centerOnZeroOnNegativeMin | boolean | If negative and positive values, center around 0 |
displayUnit | string | AbstractUnit | displayed unit |
number[]
LogAbstractData.calculateNeatLimits
▸ clear(): AccumulationCycleData
Clear log data. Removes all samples and reset depth limits
▸ connectStyle(style, type, callback): AccumulationCycleData
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
▸ disconnectStyle(style, type, callback): AccumulationCycleData
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
IStyleListener.disconnectStyle
▸ dispose(): void
Dispose.
void
▸ getClassName(): string
string
▸ getColor(index): string
Return color by index
Deprecated
since 4.1 Use getFillStyle instead
| Name | Type | Description |
|---|---|---|
index | number | index of the sample in the array |
string
▸ getColors(): string[]
Return an array of colors
string[]
▸ getDataOrder(): Order
Return the order of the log data
▸ getDepth(index): number
Return depth by index
| Name | Type | Description |
|---|---|---|
index | number | index at the depth |
number
▸ getDepths(): number[]
Return an array of depths
number[]
▸ getFillStyle(index): FillStyle
Return color by index
| Name | Type | Description |
|---|---|---|
index | number | index of the sample in the array |
▸ getFillStyles(): FillStyle[]
Return an array of fill styles
▸ getIndexAt(depth, fromIndex?, toIndex?): number
Return index for specified depth
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the index |
Optional fromIndex | number | index of sample in depths |
Optional toIndex | number | index of sample in depths |
number
▸ getIndexUnit(): AbstractUnit
Return the value unit
Throws
when this method is not implemented
▸ getInvalidateMethod(): AttributeCallback<EventDispatcher>
invalidate Method
AttributeCallback<EventDispatcher>
method to invalidate this object
▸ getMaxDepth(): number
Return maximum depth
number
▸ getMaxMeaningDepth(): number
Return maximum Meaning depth (last depth with value)
number
LogAbstractData.getMaxMeaningDepth
▸ getMaxValue(): number
Return maximum data value
number
▸ getMinDepth(): number
Return minimum depth
number
▸ getMinMeaningDepth(): number
Return minimum Meaning depth (first depth with value)
number
LogAbstractData.getMinMeaningDepth
▸ getMinValue(): number
Return minimum data value
number
▸ getName(): string
Return name of the data
string
▸ getProperties(): OptionsOut
Gets all the properties pertaining to this object
properties object
▸ getSize(): number
Return a count of the samples
number
▸ getState(): LogDataState
Return state
▸ getTimeStamp(): number
Return the value to indicate if data source was changed
number
▸ getTitle(index): string
Return title by index
| Name | Type | Description |
|---|---|---|
index | number | index at the depth |
string
▸ getTitles(): string[]
Return titles of the data
string[]
▸ getValue(index): number
Return value by index
| Name | Type | Description |
|---|---|---|
index | number | index of the sample in the array |
number
▸ getValueAt(depth, fromIndex?, toIndex?, interpolation?): number
Return the value matching the given depth or NaN if the given depth is out of the logdata depth range.
If the depths are strictly increasing:
- The returned value will be interpolated when necessary. See example 1
If the depths are not strictly increasing but never decreasing:
- The value returned will be the first one found (in the insertion order). See example 2
- The value returned will be interpolated between the last one found and its closest larger neighbor. See example 2
If the depths are not always increasing (not forward only):
- The value returned will be the last one found (in the insertion order). See example 3
- The value returned will be interpolated between the first one found and its closest larger neighbor. See example 3
Examples assume the default linear interpolation
Example
// Depth Value
// 0 0
// 100 1
// 200 2
getValueAt(100) // -> 1
getValueAt(150) // -> 1.5Example
// Depth Value
// 0 0
// 100 1
// 100 2
// 200 3
getValueAt(100) // -> 1
getValueAt(150) // -> 2.5Example
// Depth Value
// 0 0
// 100 1
// 200 2
// 100 3
getValueAt(100) // -> 3
getValueAt(150) // -> 1.5| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
Optional fromIndex | number | index of sample in depths |
Optional toIndex | number | index of sample in depths |
Optional interpolation | InterpolationType | interpolation type for the value |
number
▸ getValueInRange(depth, prev, next): number
Return value by depth, using linear interpolation if necessary.
See LogAbstractData.findValueAt.
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
prev | number | The index of the largest previous depth |
next | number | The index of the smallest following depth |
number
LogAbstractData.getValueInRange
▸ getValueUnit(): AbstractUnit
Return the depth unit
Throws
when this method is not implemented
▸ getValues(): number[]
Return values
number[]
▸ 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
LogAbstractData.hasEventListener
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isForwardOnly(): boolean
Return true if data is in ascending order
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ mergeValue(depth, value, color): void
Insert/Replace the given value at the correct place in the log. This function works ONLY if the existing data is ordered.
Example
Depth Value
100 0
200 1
mergeValue(150,3)
Depth Value
100 0
150 3
200 1| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
value | number | value at the depth |
color | string | color at the depth |
void
▸ mergeValues(depths, values, fillStyles): void
Inserts/Replace the given values at the correct place in the log. This function works ONLY if the existing data is ordered.
Example
Depth Value
50 0
100 1
200 2
300 3
mergeValue([0,100,150,500], [-1,-100,-150,-500])
---- Depth Value
===> 0 -1
---- 50 0
===> 100 -100
===> 150 -150
---- 200 2
---- 300 3
===> 500 -500| Name | Type | Description |
|---|---|---|
depths | number[] | the place where to merge in the log |
values | number[] | the values to merge |
fillStyles | Type[] | the fill styles to merge |
void
▸ notify<E>(type, source, args?): AccumulationCycleData
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | LogAbstractData | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): AccumulationCycleData
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: AccumulationCycleData, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): AccumulationCycleData
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: AccumulationCycleData, args: EventMap[E]) => void | to be called |
this
▸ parseFromString(depths, values, colors): AccumulationCycleData
Sets the depths and values of this AccumulationCycleData using the given string arrays. Uses parseFloat() to parse strings, also recognize 'NaN' values as Number.NaN.
| Name | Type | Description |
|---|---|---|
depths | string | comma-delimited array of depths |
values | string | comma-delimited array of values |
colors | string | comma-delimited array of colors |
▸ removeValues(index, count): void
Remove values
| Name | Type | Description |
|---|---|---|
index | number | position where to remove the values |
count | number | count of samples |
void
▸ requestData(range, scale, callback?): void
| Name | Type | Description |
|---|---|---|
range | Range | range |
scale | number | scale |
Optional callback | () => void | callback to be called after loading data |
void
▸ resumeUpdate(forceUpdate): AccumulationCycleData
Resume update. forceUpdate updates data statistics (update min, max of values, depths...)
| Name | Type | Description |
|---|---|---|
forceUpdate | boolean | force update based on the state of the data |
this
▸ setColor(index, color): AccumulationCycleData
Set fill color by index
Deprecated
since 4.1 Use setFillStyle instead
| Name | Type | Description |
|---|---|---|
index | number | index of the sample |
color | string | fill color |
this
▸ setFillStyle(index, fillStyle, merge?): AccumulationCycleData
Set fill style by index
| Name | Type | Description |
|---|---|---|
index | number | index of the sample |
fillStyle | Type | fill style |
Optional merge | boolean | true if you want to merge fillStyle with existing attribute, false by default |
this
▸ setIndexUnit(unit): AccumulationCycleData
Sets index unit
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | index unit |
this
▸ setName(name): AccumulationCycleData
Set name of the data
| Name | Type | Description |
|---|---|---|
name | string | The log data name |
this
▸ setProperties(properties?): AccumulationCycleData
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
this
▸ setSilent(bool): AccumulationCycleData
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setState(state): AccumulationCycleData
Sets state of data. Values can be (Empty,Normal, Warning,Error,Fetching).
| Name | Type | Description |
|---|---|---|
state | LogDataState | state of data. |
this
▸ setTitles(titles): AccumulationCycleData
Set titles of the data
| Name | Type | Description |
|---|---|---|
titles | string[] | The log data titles |
this
▸ setValue(index, value): AccumulationCycleData
Set value by index
| Name | Type | Description |
|---|---|---|
index | number | index of the sample |
value | number | sample values |
this
▸ setValueUnit(unit): AccumulationCycleData
Sets value unit
| Name | Type | Description |
|---|---|---|
unit | string | AbstractUnit | value unit |
this
▸ setValues(depths, values, fillStyles, titles?): AccumulationCycleData
Sets values
| Name | Type | Description |
|---|---|---|
depths | number[] | The array of ordered depths |
values | number[] | The array of values |
fillStyles | Type[] | The array of fillStyles |
Optional titles | string[] | The array of titles |
this
▸ suspendUpdate(): AccumulationCycleData
Suspend update
this
▸ trimValues(startDepth, endDepth): void
Remove values from start to end depth. If startDepth is NaN or endDepth is NaN then it uses infinity values
| Name | Type | Description |
|---|---|---|
startDepth | number | where to start trim |
endDepth | number | where to end trim |
void
▸ Protected update(args?): void
Notify when data has been changed.
| Name | Type | Description |
|---|---|---|
Optional args | LogDataEvent | optional parameters |
void
▸ Protected updateDataStatistics(): AccumulationCycleData
Update data statistics
this
LogAbstractData.updateDataStatistics
▸ updateTimeStamp(): void
Update time stamp
void
LogAbstractData.updateTimeStamp
▸ Static findValueAt(depth, depths, values, prev, next, interpolation?): number
Utility function to interpolate a value between two depths.
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
depths | number[] | The array of ordered depths |
values | number[] | The array of values |
prev | number | The index of the largest previous depth |
next | number | The index of the smallest following depth |
Optional interpolation | InterpolationType | interpolation type for the value |
number
The interpolated value or Number.NaN if outside the range
▸ Static getClassName(): string
string
▸ Static interpolateValueAt(depth, depthPrev, valuePrev, depthNext, valueNext, interpolation?): number
Utility function to interpolate a value between two depths.
| Name | Type | Description |
|---|---|---|
depth | number | The depth for which you want to compute the value |
depthPrev | number | prev depth |
valuePrev | number | prev value |
depthNext | number | next depth |
valueNext | number | next value |
Optional interpolation | InterpolationType | interpolation type for the value |
number
The interpolated value or Number.NaN if outside the range