StructureProfile Class
Visualization of a singular snow profile SLF style with an additional visualization of the structure profile according to Monti et Schweizer "Snow profile visualisations to highlight structural instability conditions" (2013). A miniature version exists which may be used in combination with a timeline graph.
Constructor
Item Index
Methods
- add
- align
- arrange
- arrow
- arrows
- buildpopup
- clear
- comment
- commentstxt
- config
- configure
- connect
- coordsys
- cttxt
- destroy
- directlayout
- draw
- draw_block
- draw_columns
- draw_curve
- draw_lower_legend
- ecttxt
- flags
- flagstxt
- format
- hatching
- hatching
- header
- highlight
- hs
- index
- layout
- loadcolumns
- miniconfig
- mousemove
- mouseon
- multitext
- partition
- popup
- position
- rbtxt
- remove
- select
- setbarcfg
- setProperties
- setup
- shiftdown
- show
- slope
- stbtxt
- table
- testorder
- testprint
- toggle
- toString
- unhighlight
- y
- zoom
Methods
add
-
object
-
[position]
align
-
partitions
Parameters:
-
partitions
Array< Array
Returns:
arrange
-
partitions
Parameters:
-
partitions
Array< Array
arrow
-
feature
-
type
Callback for BarGraph. Draw the red arrows to highlight instable structures.
arrows
-
params
-
name
Draw the arrows for the parameters passed.
Parameters:
-
params
ArrayThe parameters to be drawn
-
name
StringName for the svg group container, that will hold the arrows
buildpopup
-
paper
-
p
-
text
-
x
-
y
Build the popup for the temperature / gradient curve.
clear
()
private
Delete the hs, datesmall and layerlines elements.
comment
()
private
Draw the comment box on the graph.
commentstxt
-
paper
-
p
-
center
-
txt
-
layer
-
offsetx
-
width
-
height
-
lindex
Parameters:
-
paper
ObjectSnapSVG paper -
p
ObjectProperties object -
center
ObjectPixel coordinates used for positioning -
txt
ObjectFont object -
layer
ValueThe layer object, -
offsetx
ValueThe x-coord at the left of the column -
width
ValueMax-width number of fontsizes -
height
ValueHeight of the cell in pixel -
lindex
NumberLayer index (for cross referencing)
Returns:
config
()
private
Configure basic properties of the SLFProfile and the parent class TabularProfile such as font, table margins, height and width.
configure
()
private
Configure all properties and axes dependent on canvas size and whether the graph shall be used in miniature or normal mode.
connect
-
partition
-
offset
Parameters:
-
partition
ArrayPrimary partition, to be connected to graph -
offset
NumberPixel position of the right edge of the graph
coordsys
()
private
Draw the coordinate system
cttxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
destroy
()
Deregister events
directlayout
-
partition
-
data
Parameters:
-
partition
ArrayThe partition (column) to be layed out -
data
Feature
draw
-
profile
Draw the StructureProfile by drawing the bargraph.
Parameters:
-
profile
ProfileThe niViz profile to render
draw_block
-
parameter
-
color
-
name
Draw a parameter of the profile as a staircase graph.
draw_columns
-
partitions
Parameters:
-
partitions
Array< ArrayAll partitions
draw_curve
-
parameter
Draw a parameter of the profile as a curve.
Parameters:
-
parameter
StringThe profile parameter (e. g. temperature, gradient)
draw_lower_legend
-
parameter
Draw legend for the curve (temperature/gradient) at the bottom of the graph.
Parameters:
-
parameter
StringThe profile parameter (e. g. temperature, gradient)
ecttxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
flags
-
offset
-
data
Parameters:
-
offset
NumberPixel position -
data
Feature
flagstxt
-
paper
-
p
-
center
-
txt
-
layer
-
offset
Parameters:
Returns:
format
-
textbox
-
current
-
addendum
Actually add the addendum string by making sure it doesn't transgress the boundaries of the textbox.
Parameters:
Returns:
The altered comment string
hatching
-
color
-
[angle]
Draw the hatched pattern
Returns:
The pattern to be used for some fill property
hatching
-
color
-
bgcolor
Draw a vertically hatched pattern
Returns:
The pattern to be used for some fill property
header
-
offset
-
options
-
data
highlight
-
y
Parameters:
-
y
Numbery-coordinate as pixel value
index
-
y
Parameters:
-
y
Numbery-coordinate as pixel value
Returns:
layout
-
partitions
Parameters:
-
partitions
Array< Array
Returns:
loadcolumns
()
private
miniconfig
()
private
Configure parameters for miniature mode.
mousemove
()
Boolean
private
Method to be called when mousemove event is detected. It calls the method SLFProfile:show in turn and deals with the comment box.
Returns:
on Turn mouse events on
mouseon
()
private
multitext
-
x
-
y
-
text
Print out multilined text, each line is nested in a
separate
Parameters:
Returns:
Multilined text element
partition
-
partition
-
data
-
height
Parameters:
-
partition
ArrayThe primary (column) to be layed out -
data
Feature -
height
NumberThe minimal height of a table row
Returns:
popup
-
X
-
Y
-
set
-
pos
-
stretch
Draw a niViz popup
Parameters:
Returns:
The popup
position
-
partitions
-
index
-
primeindex
-
data
-
height
Parameters:
Returns:
print
-
param
-
lbl
-
box
-
current
Print the stability test ECT and CT (comment section).
Parameters:
Returns:
The altered comment string
rbtxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
remove
-
column
Parameters:
-
column
NumberThe column index to remove
select
()
Array< Array
private
Returns:
setbarcfg
()
private
Configure bargraph properties.
setProperties
-
properties
Overwrite current properties with the ones passed as parameter.
Parameters:
-
properties
Object
setup
()
private
Configure the axes for hs, hardness, temperature and the gradient parameters.
shiftdown
-
partitions
-
primeindex
-
primepos
-
index
-
shift
-
height
Parameters:
-
partitions
Array< ArrayAll partitions -
primeindex
NumberIndex of primary partition -
primepos
NumberOnly shift down below this height of the primary partition -
index
NumberIndex up to which shifting may occur (i. e. currently positioned) -
shift
NumberNumber of pixels to shift down -
height
NumberMinimal height of a row
show
-
x
-
y
Draw the popup for the temperature or gradient curve (whichever is present) if mouse cursor is close to or on data point of the curve.
slope
-
x
-
y
-
svg
stbtxt
-
paper
-
p
-
center
-
txt
-
layer
Parameters:
Returns:
table
()
protected
testorder
-
test
Check if the passed stability test is ordered and if so return the ordered sequence.
Parameters:
-
test
FeatureCT or ECT
Returns:
The sequence of tests
testprint
-
box
-
current
Print the stability test ECT and CT (comment section).
Returns:
The altered comment string
toggle
()
private
Toggle between gradient and temperature curve.
toString
-
value
-
type
-
offset
-
y
-
width
-
height
-
layer
Parameters:
Returns:
unhighlight
()
private
y
-
y
Parameters:
-
y
NumberSnow height
Returns:
zoom
-
range
Parameters:
-
range
ObjectAn object with a min, max and axis property