Element Ticks
JXG.GeometryElement
↳ JXG.Ticks
↳ Ticks
Ticks are used as distance markers on a line.
Defined in: ticks.js.
Extends
JXG.Ticks.
Constructor Attributes | Constructor Name and Description |
---|---|
- Methods borrowed from class JXG.Ticks:
- _adjustTickDistance, _makeLabel, _tickEndings, calculateTicksCoordinates, hasPoint, removeTickLabels, setPositionDirectly, update, updateRenderer
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getTextAnchor, getType, hideElement, labelColor, noHighlight, normalize, off, on, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabelText, showElement, triggerEventHandlers
- Events borrowed from class JXG.GeometryElement:
- attribute, attribute:<attribute><attribute>, down, drag, mousedown, mousedrag, mousemove, mouseout, mouseover, mouseup, move, out, over, touchdown, touchdrag, touchup, up
Element Detail
Ticks
-
This element has no direct constructor. To create an instance of this element you have to call JXG.Board#create
with type "ticks".
- Possible parent array combinations are:
-
- The parents consist of the line the ticks are going to be attached to and the distance between two major ticks. The third parameter (optional) is a function which determines the tick label. It has as parameter a coords object containing the coordinates of the new tick.
- Throws:
- {Exception}
- If the element cannot be constructed with the given parent objects an exception is thrown.
- Examples:
// Create an axis providing two coord pairs. var p1 = board.create('point', [0, 3]); var p2 = board.create('point', [1, 3]); var l1 = board.create('line', [p1, p2]); var t = board.create('ticks', [l1], {ticksDistance: 2});
Attributes borrowed from other Elements
- Attributes borrowed from class JXG.Ticks:
- anchor, drawLabels, drawZero, generateLabelValue, insertTicks, labels, majorHeight, maxLabelLength, minorHeight, minorTicks, precision, scale, scaleSymbol, tickEndings, ticksDistance
- Attributes borrowed from class JXG.GeometryElement:
- dash, draft, fillColor, fillOpacity, fixed, frozen, highlight, highlightFillColor, highlightFillOpacity, highlightStrokeColor, highlightStrokeOpacity, highlightStrokeWidth, needsRegularUpdate, scalable, shadow, snapToGrid, strokeColor, strokeOpacity, strokeWidth, trace, traceAttributes, visible, withLabel
Fields borrowed from other Elements
- Fields borrowed from class JXG.Ticks:
- board, equidistant, fixedTicks, labelCounter, labelsRepo, line, maxTicksDistance, minTicksDistance, ticksFunction
- Fields borrowed from class JXG.GeometryElement:
- _pos, addEvent, ancestors, baseElement, childElements, descendants, dump, elementClass, elType, eventHandlers, getProperty, hasLabel, highlighted, id, isDraggable, isReal, lastDragTime, methodMap, mouseover, name, needsUpdate, notExistingParents, numTraces, quadraticform, removeEvent, rendNode, setProperty, stdform, subs, symbolic, traces, transformations, type, visProp
Methods borrowed from other Elements
- Methods borrowed from class JXG.Ticks:
- _adjustTickDistance, _makeLabel, _tickEndings, calculateTicksCoordinates, hasPoint, removeTickLabels, setPositionDirectly, update, updateRenderer
- Methods borrowed from class JXG.GeometryElement:
- _set, addChild, addDescendants, addRotation, addTransform, animate, bounds, clearTrace, cloneToBackground, countChildren, createGradient, createLabel, draggable, generatePolynomial, getAttribute, getAttributes, getLabelAnchor, getName, getParents, getTextAnchor, getType, hideElement, labelColor, noHighlight, normalize, off, on, prepareUpdate, remove, removeChild, removeDescendants, resolveShortcuts, setArrow, setAttribute, setDash, setLabelText, showElement, triggerEventHandlers
Events borrowed from other Elements