meteoJS/thermodynamicDiagram/axis . Axis
Source: thermodynamicDiagram/
Abstract class to draw an axis with labelling.
Properties
new Axis(options)
Parameter
Name | Type | Optional | Description |
---|---|---|---|
options |
|
|
Options. |
Properties
coordinateSystem unknown
Coordinate system.
height unknown
Height of the area.
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#height
maxExtentLength unknown
Maximal extent length (either width or height).
minExtentLength unknown
Minimal extent length (either width or height).
style unknown
Overflow-style of the area.
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#style
svgNode unknown
SVG container node.
visible unknown
Visibility of the area.
width unknown
Width of the area.
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#width
x unknown
X of the top-left edge.
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#x
y unknown
Y of the top-left edge.
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#y
Methods
_drawBackground()
Draw background into SVG group.
addTo(svgNode)
Sets the plot area as a child of the argument.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
svgNode |
|
|
SVG node. |
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#addTo
drawBackground(svgNode)
Draw background into SVG group.
This method is only called, when this.coordinateSystem isn't undefined.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
svgNode |
|
|
SVG group, SVG.G. |
drawLabels(svgNode, min, max, getTextByInterval, getPositionByInterval)
Draws the labels of the axis.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
svgNode |
|
Node to draw into. |
|
min |
number |
|
Minimum value for the labels. |
max |
number |
|
Maximum value for the labels. |
getTextByInterval |
function() |
|
Returns the text representation of the label value (its argument). |
getPositionByInterval |
function() |
|
Returns the position in pixels of the label value (its argument). |
getExtendedEvent(e, p)
Extend an event with some properties.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
e |
|
|
Event. |
p |
|
|
Point. |
getNormalizedLabelsOptions(options) → module:meteoJS/thermodynamicDiagram/axis~labelsOptions
Normalize the options for the labels.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
options |
|
Options. |
- Returns
-
module:meteoJS/thermodynamicDiagram/axis~labelsOptions
Normalized options.
init()
Init the area.
- Inherited from
- module:meteoJS/thermodynamicDiagram/plotArea.PlotArea#init
onCoordinateSystemChange()
Called, when the coordinateSystem object changes.