Child class

Class

Abstract types

inner

filterDataPoint(pointData, lastPointData)

Filter data point before drawing.

Parameters

Name Type Optional Description

pointData

Object

 

Point data.

Values in pointData have the following properties:

Name Type Optional Description

levelData

module:meteoJS/sounding~levelData

 

Level data.

x

number

 

x coordinate of the data point.

y

nmber

 

y coordinate of the data point.

lastPointData

Object

 

Data of the last point.

Values in lastPointData have the following properties:

Name Type Optional Description

levelData

module:meteoJS/sounding~levelData

Yes

Level data of the last point.

x

number

Yes

x coordinate of the last data point.

y

nmber

Yes

y coordinate of the last data point.

inner

getCoordinatesByLevelData(dataGroupId, sounding, levelData, plotArea) → Object

Returns x and y coordinates in the Plot-Area for the passed levelData.

Parameters

Name Type Optional Description

dataGroupId

string

 

Data group id.

sounding

module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

Corresponding sounding.

levelData

module:meteoJS/sounding~levelData

 

Level data of the sounding.

plotArea

module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea

 

Plot-Area.

Returns

Object - Containing x and y.

inner

getHoverSounding(soundings) → (undefined or module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding)

For the returned sounding, the hover labels are shown. As input all currently visible soundings are passed.

Parameter

Name Type Optional Description

soundings

Array of module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

Currently visible soundings. Array length is always at least 1.

Returns

(undefined or module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding) For this returned sounding, the hover labels are shown. No hover labes are shown, if undefined is returned.

inner

getLevelData(options) → module:meteoJS/sounding~levelData

Getter for the levelData of a certain DiagramSounding according to an event.

Parameters

Name Type Optional Description

options

Object

 

Options.

Values in options have the following properties:

Name Type Optional Description

hoverLabelsSounding

module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

For this sounding, the hover labels are shown.

e

module:meteoJS/thermodynamicDiagram/plotArea~event

 

This event raised the display of hover labels.

maxDistance

(undefined or number)

 

Maximum distance to a data point to show a hover label in pixels. If undefined, always a hover label to the nearest point is shown.

Returns

module:meteoJS/sounding~levelData The data to show in the label. This data is passed to module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc.

inner

getSoundingVisibility(sounding) → boolean

Visibility of the sounding in an area.

Parameter

Name Type Optional Description

sounding

module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

Sounding to determine its visibility.

Returns

boolean Visibility.

inner

hoverLabelsOptions  Object

Options for labels on hovering the plot area.

Properties

Name Type Optional Description

visible

boolean

Yes

Visibility.

Defaults to true.

type

string

Yes

Event type.

Defaults to 'mousemove'.

maxDistance

number

Yes

Maximum distance to a data point to show a hover label in pixels. If undefined, always a hover label to the nearest point is shown.

remote

boolean

Yes

Show labels relative to the mouse position on the diagram, even when the pointer isn't directly on the plot area.

Defaults to true.

insertLabelsFunc

module:meteoJS/thermodynamicDiagram/plotDataArea~insertLabelsFunc

Yes

Called to insert labels into a SVG group.

getLevelData

module:meteoJS/thermodynamicDiagram/plotDataArea~getLevelData

Yes

.

getHoverSounding

module:meteoJS/thermodynamicDiagram/plotDataArea~getHoverSounding

Yes

Default: Return the first sounding of the passed input array.

inner

insertDataGroupInto(svgNode, dataGroupId, sounding, data, plotArea)

Draws data into a SVG node.

Parameters

Name Type Optional Description

svgNode

external:SVG

 

Insert sounding data into this SVG node.

dataGroupId

string

 

Data group id.

sounding

module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

Corresponding sounding.

data

Array of Object

 

Data of the sounding, containing x and y coordinates and levelData.

plotArea

module:meteoJS/thermodynamicDiagram/plotDataArea.PlotDataArea

 

Plot-Area.

inner

insertLabelsFunc(sounding, levelData, group)

Function to insert labels.

Parameters

Name Type Optional Description

sounding

module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

Diagram sounding to label.

levelData

module:meteoJS/sounding~levelData

 

Data to label.

group

external:SVG

 

SVG group to insert labels.

inner

insertSoundingEvent  module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent

Event with a sounding object and its SVG node.

Property

Name Type Optional Description

node

external:SVG

 

SVG node, SVG.G.

inner

options  module:meteoJS/thermodynamicDiagram/plotArea~options

Options for the constructor.

Parameters

Name Type Optional Description

getSoundingVisibility

module:meteoJS/thermodynamicDiagram/plotDataArea~getSoundingVisibility

Yes

Takes a sounding object and returns the visibility for the area.

dataGroupIds

Array of string

Yes

IDs of several grouped datas.

Defaults to [].

getCoordinatesByLevelData

module:meteoJS/thermodynamicDiagram/plotDataArea~getCoordinatesByLevelData

Yes

Coordinate function.

insertDataGroupInto

module:meteoJS/thermodynamicDiagram/plotDataArea~insertDataGroupInto

Yes

SVG drawing function.

filterDataPoint

(undefined or module:meteoJS/thermodynamicDiagram/plotDataArea~filterDataPoint)

Yes

Function to filter data points, that shouldn't be plotted. If undefined, no data point is filtered (expect minDataPointsDistance is set).

minDataPointsDistance

number

Yes

Minimum distance between data points in pixels. If filterDataPoint is set, minDataPointsDistance is ignored.

Defaults to 0.

Property

Name Type Optional Description

hoverLabels

module:meteoJS/thermodynamicDiagram/plotDataArea~hoverLabelsOptions

Yes

Hover labels options.

inner

soundingEvent  Object

Event with a sounding object.

Property

Name Type Optional Description

sounding

module:meteoJS/thermodynamicDiagram/diagramSounding.DiagramSounding

 

Sounding.

Events

add:sounding  module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent

Fired on adding a sounding.

postinsert:sounding  module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent

Fired after inserting the sounding data into the svg.

preinsert:sounding  module:meteoJS/thermodynamicDiagram/plotDataArea~insertSoundingEvent

Fired before inserting the sounding data into the svg.

remove:sounding  module:meteoJS/thermodynamicDiagram/plotDataArea~soundingEvent

Fired on removing a sounding.