Text
Text annotation
Properties
Sets the horizontal alignment of the text
within the box. Has an effect only if text
spans two or more lines (i.e. text
contains one or more
HTML tags) or if an explicit width is set to override the text width. Default: center.
Sets the color of the annotation arrow.
Sets the x component of the arrow tail about the arrow head. If axref
is pixel
, a positive (negative) component corresponds to an arrow pointing from right to left (left to right). If axref
is an axis, this is an absolute value on that axis, like x
, NOT a relative value.
Sets the y component of the arrow tail about the arrow head. If ayref
is pixel
, a positive (negative) component corresponds to an arrow pointing from bottom to top (top to bottom). If ayref
is an axis, this is an absolute value on that axis, like y
, NOT a relative value.
Sets the background color of the annotation. Default: "rgba(0, 0, 0, 0)"
Sets a distance, in pixels, to move the end arrowhead away from the position it is pointing at, for example to point at the edge of a marker independent of zoom. Note that this shortens the arrow from the ax
/ ay
vector, in contrast to xshift
/ yshift
which moves everything by this amount.
Sets the vertical alignment of the text
within the box. Has an effect only if an explicit height is set to override the text height. Default: middle.
Sets the annotation's x position. If the axis type
is "log", then you must take the log of your desired range. If the axis type
is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis type
is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.
Sets the text box's horizontal position anchor This anchor binds the x
position to the "left", "center" or "right" of the annotation. For example, if x
is set to 1, xref
to "paper" and xanchor
to "right" then the right-most portion of the annotation lines up with the right-most edge of the plotting area. If "auto", the anchor is equivalent to "center" for data-referenced annotations or if there is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side. Default: auto.
Sets the annotation's x coordinate axis. If set to an x axis id (e.g. "x" or "x2"), the x
position refers to an x coordinate If set to "paper", the x
position refers to the distance from the left side of the plotting area in normalized coordinates where 0 (1) corresponds to the left (right) side.
Sets the annotation's y position. If the axis type
is "log", then you must take the log of your desired range. If the axis type
is "date", it should be date strings, like date data, though Date objects and unix milliseconds will be accepted and converted to strings. If the axis type
is "category", it should be numbers, using the scale where each category is assigned a serial number from zero in the order it appears.
Sets the text box's vertical position anchor This anchor binds the y
position to the "top", "middle" or "bottom" of the annotation. For example, if y
is set to 1, yref
to "paper" and yanchor
to "top" then the top-most portion of the annotation lines up with the top-most edge of the plotting area. If "auto", the anchor is equivalent to "middle" for data-referenced annotations or if there is an arrow, whereas for paper-referenced with no arrow, the anchor picked corresponds to the closest side. Default: auto.
Sets the annotation's y coordinate axis. If set to an y axis id (e.g. "y" or "y2"), the y
position refers to an y coordinate If set to "paper", the y
position refers to the distance from the bottom of the plotting area in normalized coordinates where 0 (1) corresponds to the bottom (top).
Functions
A safe Number ray
A safe Number range
Convert any type-safe configurator to json string