JavaScript must be enabled in order for you to use JSXGraph and JSXGraph reference. However, it seems JavaScript is either disabled or not supported by your browser.

Class Index | File Index

Elements

Classes


Class JXG.Ticks

JXG.GeometryElement
      ↳ JXG.Ticks

Ticks provides methods for creation and management of ticks on an axis.

Defined in: Ticks.js.
Extends JXG.GeometryElement.

Class Summary
Constructor Attributes Constructor Name and Description
 
JXG.Ticks(line, ticks, attributes)
Creates ticks for an axis.
Attributes Summary
Field Attributes Field Name and Description
 
Draw labels yes/no
 
Draw the zero tick, that lies at line.point1?
 
If the distance between two ticks is too big we could insert new ticks.
 
Total height of a major tick.
 
Total height of a minor tick.
 
The number of minor ticks between two major ticks.
 
The default distance between two ticks.
Fields borrowed from class JXG.GeometryElement:
addEvent, ancestors, baseElement, childElements, dash, descendants, draft, dump, elementClass, elType, eventHandlers, fillColor, fillOpacity, fixed, frozen, getAttribute, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isDraggable, isReal, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, type, visible, visProp, withLabel
Field Summary
Field Attributes Field Name and Description
 
The board the ticks line is drawn on.
 
Equidistant ticks.
 
Array of fixed ticks.
 
Array where the labels are saved.
 
The line the ticks belong to.
<deprecated>  
Maximum distance between two ticks, measured in pixels.
 
Least distance between two ticks, measured in pixels.
 
A function calculating ticks delta depending on the ticks number.
Fields borrowed from class JXG.GeometryElement:
addEvent, ancestors, baseElement, childElements, dash, descendants, draft, dump, elementClass, elType, eventHandlers, fillColor, fillOpacity, fixed, frozen, getAttribute, hasLabel, highlight, highlighted, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, id, isDraggable, isReal, methodMap, mouseover, name, needsRegularUpdate, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, shadow, stdform, strokeColor, strokeOpacity, strokeWidth, subs, symbolic, trace, traceAttributes, traces, transformations, type, visible, visProp, withLabel
Method Summary
Method Attributes Method Name and Description
<private>  
_makeLabel(pos, newTick, board, drawLabels, id, i)
Create a tick label
 
(Re-)calculates the ticks coordinates.
 
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:
_set, addChild, addDescendants, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttributes, getLabelAnchor, getName, getParents, getProperty, getTextAnchor, getType, hasPoint, hideElement, labelColor, noHighlight, normalize, off, on, prepareUpdate, remove, resolveShortcuts, setArrow, setAttribute, setDash, setLabelText, setProperty, setStraight, showElement, triggerEventHandlers
Class Detail
JXG.Ticks(line, ticks, attributes)
Creates ticks for an axis.
Parameters:
{JXG.Line} line
Reference to the axis the ticks are drawn on.


{Number|Array} ticks
Number defining the distance between two major ticks or an array defining static ticks.


{Object} attributes
Properties


See:
JXG.Line#addTicks
Attribute Detail
{Boolean} drawLabels
Draw labels yes/no
Defined in: Options.js.
Default Value:
false

{Boolean} drawZero
Draw the zero tick, that lies at line.point1?
Defined in: Options.js.
Default Value:
false

{Boolean} 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.
Defined in: Options.js.
See:
JXG.Ticks#equidistant
JXG.Ticks#maxTicksDistance
Default Value:
false

{Number} majorHeight
Total height of a major tick. If negative the full height of the board is taken.
Defined in: Options.js.

{Number} minorHeight
Total height of a minor tick. If negative the full height of the board is taken.
Defined in: Options.js.

{Number} minorTicks
The number of minor ticks between two major ticks.
Defined in: Options.js.

{Boolean} ticksDistance
The default distance between two ticks. Please be aware that this value does not have to be used if JXG.Ticks#insertTicks is set to true.
Defined in: Options.js.
See:
JXG.Ticks#equidistant
JXG.Ticks#insertTicks
Default Value:
1
Field Detail
{JXG.Board} board
The board the ticks line is drawn on.

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

{Array} fixedTicks
Array of fixed ticks.

{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} maxTicksDistance
Maximum distance between two ticks, measured in pixels. Is used only when insertTicks is set to true.
Deprecated:
This value will be ignored.
See:
#insertTicks

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

{Function} ticksFunction
A function calculating ticks delta depending on the ticks number.
Method Detail
<private> _makeLabel(pos, newTick, board, drawLabels, id, i)
Create a tick label
Parameters:
pos
newTick
board
drawLabels
id
i

calculateTicksCoordinates()
(Re-)calculates the ticks coordinates.

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 Mon Apr 02 2012 18:34:34 GMT+0200 (MESZ)