Axis Class
Axis is a Jermaine model that controls Multigraph axes.
Constructor
Axis
-
Orientation
Parameters:
-
Orientation
AxisOrientation
Item Index
Methods
distanceToPoint
-
x
-
y
Compute the distance from an axis to a point. The point (x,y) is expressed in pixel coordinates in the same coordinate system as the axis.
We use two different kinds of computations depending on whether the point lies inside or outside the region bounded by the two lines perpendicular to the axis through its endpoints. If the point lies inside this region, the distance is simply the difference in the perpendicular coordinate of the point and the perpendicular coordinate of the axis.
If the point lies outside the region, then the distance is the L2 distance between the point and the closest endpoint of the axis.
Parameters:
-
x
Object -
y
Object
hasDataMax
()
Boolean
Convenience method for checking to see if dataMax has been set or not.
Returns:
hasDataMin
()
Boolean
Convenience method for checking to see if dataMin has been set or not
Returns:
prepareRender
-
graphicsContext
Decides which labeler to use: take the one with the largest density <= 0.8.
Unless all have density > 0.8, in which case we take the first one. This assumes
that the labelers list is ordered in increasing order of label density.
This function sets the currentLabeler
and currentLabelDensity
attributes.
Parameters:
-
graphicsContext
Object
Properties
dataMax
DataValue
The current max DataValue for the axis.
dataMin
DataValue
The current min DataValue for the axis.
max
String
Stores the "max" value from the mugl file as a string, if there was one.
min
String
Stores the "min" value from the mugl file as a string, if there was one.