InvalidArgumentError if the padding, the graduation, the name or the side are not valid, the axis is graduated but is not
given by two points or a point and a vector, or values is not a valid line (see Line). Nothing is left in the svg.
ReadonlyfollowableWhere a point dragged to (x, y) lands on the line: its projection, kept between the ends of a ray, a segment or
a vector. A line without a position does not constrain the point.
ReadonlyreferenceableWhether the label of another figure can be pushed away from this one (see setLabelReference): whether referenceAnchorPoint puts a position on it. A figure that overrides that overrides this too.
Angle of the line with the Ox axis, in degrees, counterclockwise.
The constraint of the line, and its shape (by default or as asked).
Replace the config of the axis: it finds its place again.
What the themes keep on the figure (the animation of a point, the steps of a presentation...), by the name of the theme. The figure does not know what the entries mean: a theme writes its own with setControl, after it checked the value, and reads it back here.
Vector from start to end, in pixels (the y axis points down).
The name of the axis as it is drawn, or null for an axis without a name or that is not drawn.
A draggable figure is moved by the user: update leaves it unless it is forced.
The figure that the label is pushed away from (see setLabelReference), or null.
A vector perpendicular to the line, as long as direction, in pixels.
How far the drawn axis stops from the borders of the drawing, in pixels.
Replace the shape of the figure: the previous shape is removed from the svg.
A static figure does not follow what it depends on: update leaves it unless it is forced (static option).
The ticks that are drawn, with their numbers. A copy, empty when the axis is not graduated or not drawn.
The vector of one unit of the axis, in pixels: d for an axis given by director, B - A for one given by through. null for an
axis found any other way (slope, parallel...), which has no unit, or that is not drawn.
Give a label to the figure. A figure has one label: a previous one is removed from the svg.
Optionalcontent: LabelContent
a text, or texts and fields ({field, digits}) that the figure computes and keeps up to date.
The text is written as it is: @ is a character like any other. By default, the name of the figure.
asHtml writes the label in HTML, for the text of a texConverter.
InvalidArgumentError if the content has a field the figure cannot show (see labelFields), or a number of digits that is not an integer of 0 or more. The figure is then left as it was.
Remove everything the figure drew, but its label: the label stays in the svg until it is replaced. The shape of
the figure is removed too, so the figure must set a new shape afterward.
Draw the stroke as dashes. The pattern is kept: it is applied again by every stroke(), so a figure that builds
a new shape keeps its dashes.
Optionaldasharray: string | number
lengths of the dashes and of the gaps, in pixels ('5', '5 2', '5,2,1'), or 'none' for a
continuous stroke. By default, DEFAULT_DASH: pixels, so the dashes look the same at any scale, resolution or zoom.
@ is the length of a segment. The slope of the other lines is @slope: a line has no most classical value.
Release what the figure holds outside of its group of the svg (an event listener, for instance): called when the graph removes the figure. Nothing by default.
Draw the stroke as dots: dashes of 3 pixels.
Fill the figure, or apply the current fill again when called without a color.
Optionalcolor: string | IColorValue
the name of a color, or {color, opacity} (opacity from 0 to 1), for instance {color: 'red', opacity: 0.5}.
The opacity only concerns the fill: it is the fill-opacity of the shape.
The shapes that carry the fill of the figure: its shape, unless the figure draws several.
Where a point dragged by the user to (x, y) lands on the figure: the point of the figure that a point
following it takes. Used by the drag of a point (drag=<figure>) and by the Follow figure.
A figure that a point can follow overrides it (a line projects the point on the line, a circle on the circle,
a plot takes the point of the curve at the same abscissa). By default, the point is not constrained.
abscissa of the dragged point, in pixels.
ordinate of the dragged point, in pixels.
the position on the figure, in pixels.
Hide the figure, and its label.
Hide the figure but its label (hide() hides both).
Whether the figure is hidden for this reason (see setHiddenBy).
The slope of the line, and the length of a segment, in units of the coordinate system (the length is written with the unit and
the scale of the graph, see IGraphConfig.measure). The slope is a fraction when it is exact and the label asks for no
decimals (see slopeText).
Put a marker (an arrow head, a cross or a bar) on the ends of the figure. The marker takes the color and the width of the stroke, whatever the order of the calls. The other end is left as it is.
the side ('start', 'end' or 'both', the default; 'none' removes the markers of both ends, and works on any figure), the size (default 10) and the shape ('->' for an arrow, the default, 'x' for a cross or '|' for a bar).
Move the shape of the figure by a vector given in the units of the coordinate system. Each move is added to the previous ones.
the vector {x, y}. A number is a move along the Ox axis, move({x: pos, y: 0}).
Move the shape of the figure by a vector given in the units of the coordinate system. Each move is added to the previous ones.
the vector {x, y}. A number is a move along the Ox axis, move({x: pos, y: 0}).
Put the label at its place (see _labelPoint), turned along the line when it is asked to.
The point of the figure that a label is pushed away from, in pixels: the position of a point, the center of a circle or an arc, the center of the vertices of a polygon.
null for a figure that is not referenceable, or that has no position now.
Take away what was asked of the figure since it was made, so that a figure that is given another configuration looks like a new one:
the appearance, the dashes and the markers, the moves and the scales of the shape, the label, what the themes kept (controls), whether the user holds it,
and whether it is hidden. The shape and the configuration stay as they are (the shape is made again, in the default style, by the
next config), and so does static, which the figure or its owner sets.
Scale the shape of the figure around its center. Each scale is multiplied with the previous ones. The label of the figure is not scaled.
the factors {x, y}. A number is the same factor on both axes.
Keep a value for a theme, or take it away with null. The figure tells its context, which tells the controllers of the graph.
The value is not checked: the theme does it (see setSlide, setAnimation).
Hide the figure, or show it again, for a reason that has a name (slide for a presentation). The figure is hidden as long as one
reason holds; hide() and the lack of a position are other causes, which this does not touch. The label goes with the figure.
Keep the label this far from the figure, in pixels, in the direction where it lies, when the label was asked no push of its own. A point that has a drag handle (a disc over the point) needs it: the handle is over its label.
Push the label away from another figure: it lies on the side of its anchor that is opposite to the reference, wherever the reference
is (a point of a circle, away from the center). The label follows the reference when it moves (Graph.update). Without a
reference, the label goes back to the side that the figure chooses for it.
the figure, or null for none. A figure whose position changes the label stays the one it was built on: it is not
a dependency, so a reference never makes a cycle.
InvalidArgumentError if the figure has no point to be pushed away from (a line, a curve: see referenceable).
Apply the current stroke again. Every figure does it after it builds a new shape. The markers and the dashes of the figure follow the stroke.
Stroke the figure with a color, and keep the width.
the name of a color, or {color, opacity} (opacity from 0 to 1). The opacity only concerns the stroke: it is the
stroke-opacity of the shape.
Stroke the figure with a width, and keep the color.
Stroke the figure with a color and a width.
the name of a color, or {color, opacity}.
width of the stroke.
The ticks carry the stroke of the axis, like its line.
The axis as TikZ: its line with the arrow and its label, then its ticks in one \draw (without the arrow), then a node for each
number and for the name, in math mode ($\frac{\pi}{2}$). The numbers have the color of the axis. Nothing for an axis that is
hidden or not drawn.
InvalidArgumentError if the appearance of the axis has no TikZ equivalent (see AbstractFigure.tikz).
Draw the figure again (computed) and update its label, to follow what it depends on.
OptionalforceUpdate: boolean
a figure that is static (it does not depend on anything that moves, as the axes) or
isDraggable (the user moves it) is left as it is, unless this is true.
Update the text of the label (computeLabel) and put it at its place (moveLabel). Nothing without a label.
An axis: a line with an arrow at its end, that stops
paddingpixels before the borders of the drawing (see IAxisConfig). Being a line, it is found like one, and is a line for the figures that are built from lines (an intersection, a perpendicular...).The axes of the coordinate system are the line through the origin with the direction of each axis; any other line can be an axis. An axis that is shorter than twice its padding, or has no position, is not drawn.
An axis can be graduated (
ticks): a tick and a number every step, from its zero. The numbers are written on one side of the axis, and thinned out when the ticks are too close (one number in as many ticks as it takes). Itsnameis written beyond the arrow.