Class Index | File Index

Classes


Class JXG.Ticks


Extends JXG.GeometryElement.
Ticks provides methods for creation and management of ticks on an axis.
Defined in: Ticks.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
JXG.Ticks(line, ticks, major, majorHeight, minorHeight, id, name, layer)
Creates ticks for an axis.
Field Summary
Field Attributes Field Name and Description
 
The board the ticks line is drawn on.
 
Draw labels yes/no
 
Draw the zero tick, that lies at line.point1?
 
Class of the element, value is OBJECT_CLASS_CIRCLE.
 
Equidistant ticks.
 
Array of fixed ticks.
 
If the distance between two ticks is too big we could insert new ticks.
 
Array where the labels are saved.
 
The line the ticks belong to.
 
Total height of a major tick.
 
Maximum distance between two ticks, measured in pixels.
 
Total height of a minor tick.
 
minorTicks is the number of minor ticks between two major ticks.
 
Least distance between two ticks, measured in pixels.
 
A function calculating ticks delta depending on the ticks number.
 
Type of GeometryElement, value is OBJECT_TYPE_ARC.
Fields borrowed from class JXG.GeometryElement:
ancestors, childElements, dash, descendants, draft, fillColor, fillOpacity, fixed, hasLabel, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isReal, layer, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, symbolic, trace, traces, transformations, visible, visProp
Method Summary
Method Attributes Method Name and Description
 
(Re-)calculates the ticks coordinates.
 
hasPoint(x, y)
Always returns false.
 
Removes the HTML divs of the tick labels before repositioning
 
Recalculate the tick positions and the labels.
 
Uses the boards renderer to update the arc.
Methods borrowed from class JXG.GeometryElement:
addChild, addLabelToElement, animate, clearTrace, hideElement, highlight, labelColor, noHighlight, remove, setArrow, setProperty, showElement
Class Detail
JXG.Ticks(line, ticks, major, majorHeight, minorHeight, id, name, layer)
Creates ticks for an axis.
Parameters:
{JXG.Line} line
Reference to the axis the ticks are drawn on.
{Number|Array|Function} ticks
Number, array or function defining the ticks.
{int} major
Every major-th tick is drawn with heightmajorHeight, the other ones are drawn with height minorHeight.
{int} majorHeight
The height used to draw major ticks.
{int} minorHeight
The height used to draw minor ticks.
{String} id
Unique identifier for this object. If null or an empty string is given, an unique id will be generated by Board.
{String} name
Not necessarily unique name, won't be visible or used by this object.
layer
See:
JXG.Board#addTicks
Field Detail
{JXG.Board} board
The board the ticks line is drawn on.

{bool} drawLabels
Draw labels yes/no

{bool} drawZero
Draw the zero tick, that lies at line.point1?

{int} elementClass
Class of the element, value is OBJECT_CLASS_CIRCLE.

{bool} equidistant
Equidistant ticks. Distance is defined by ticksFunction

{Array} fixedTicks
Array of fixed ticks.

{bool} insertTicks
If the distance between two ticks is too big we could insert new ticks. If insertTicks is true, we'll do so, otherwise we leave the distance as is. This option is ignored if equidistant is false.
See:
#equidistant
#maxTicksDistance

{array} labels
Array where the labels are saved. There is an array element for every tick, even for minor ticks which don't have labels. In this case the array element contains just null.

{JXG.Line} line
The line the ticks belong to.

{int} majorHeight
Total height of a major tick.

{int} maxTicksDistance
Maximum distance between two ticks, measured in pixels. Is used only when insertTicks is set to true.
See:
#insertTicks

{int} minorHeight
Total height of a minor tick.

{int} minorTicks
minorTicks is the number of minor ticks between two major ticks.

{int} minTicksDistance
Least distance between two ticks, measured in pixels.

{Function} ticksFunction
A function calculating ticks delta depending on the ticks number.

{int} type
Type of GeometryElement, value is OBJECT_TYPE_ARC.
Method Detail
calculateTicksCoordinates()
(Re-)calculates the ticks coordinates.

{bool} hasPoint(x, y)
Always returns false.
Parameters:
{int} x
Coordinate in x direction, screen coordinates.
{int} y
Coordinate in y direction, screen coordinates.
Returns:
{bool} Always returns false.

removeTickLabels()
Removes the HTML divs of the tick labels before repositioning

update()
Recalculate the tick positions and the labels.

updateRenderer()
Uses the boards renderer to update the arc.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Feb 26 2013 18:47:43 GMT+0100 (CET)