Text

class Text : Scheme

Text annotation

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion : SchemeSpec<Text>

Properties

Link copied to clipboard

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.

Link copied to clipboard

Sets the color of the annotation arrow.

Link copied to clipboard
var ax: Value?

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.

Link copied to clipboard
var ay: 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.

Link copied to clipboard

Sets the background color of the annotation. Default: "rgba(0, 0, 0, 0)"

Link copied to clipboard

Sets the background color of the annotation. Default: "rgba(0, 0, 0, 0)"

Link copied to clipboard
override var descriptor: MetaDescriptor?
Link copied to clipboard
var font: Font

Sets the annotation text font.

Link copied to clipboard

Sets an explicit height for the text box. null (default) lets the text set the box height. Taller text will be clipped.

Link copied to clipboard
override val meta: ObservableMutableMeta
Link copied to clipboard

Sets the opacity of the annotation (text + arrow).

Link copied to clipboard

Determines whether or not the annotation is drawn with an arrow. If "true", text is placed near the arrow's tail. If "false", text lines up with the x and y provided.

Link copied to clipboard

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.

Link copied to clipboard
var text: String?

Sets the text associated with this annotation. Plotly uses a subset of HTML tags to do things like newline (
), bold (), italics (), hyperlinks (). Tags , , are also supported.

Link copied to clipboard

Sets the angle at which the text is drawn with respect to the horizontal.

Link copied to clipboard

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.

Link copied to clipboard

Determines whether or not this annotation is visible. Default: true

Link copied to clipboard

Sets an explicit width for the text box. null (default) lets the text set the box width. Wider text will be clipped. There is no automatic wrapping; use
to start a new line.

Link copied to clipboard
var x: Value?

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.

Link copied to clipboard

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.

Link copied to clipboard
var xref: String?

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.

Link copied to clipboard
var y: Value?

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.

Link copied to clipboard

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.

Link copied to clipboard
var yref: String?

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

Link copied to clipboard
fun Scheme.color(key: Name? = null): ReadOnlyProperty<Scheme, Color>
Link copied to clipboard
fun font(block: Font.() -> Unit)
Link copied to clipboard
open operator override fun get(name: Name): MutableMeta?
Link copied to clipboard
open override fun getValue(name: Name): Value?
Link copied to clipboard
fun Scheme.numberGreaterThan(minValue: Number, default: Number = minValue, key: Name? = null): ReadWriteProperty<Any?, Number>

A safe Number ray

Link copied to clipboard
fun Scheme.numberInRange(range: ClosedRange<Double>, key: Name? = null): ReadWriteProperty<Any?, Number>

A safe Number range

Link copied to clipboard
fun position(x: Number, y: Number)
Link copied to clipboard
open operator override fun set(name: Name, node: Meta?)
Link copied to clipboard
open override fun setValue(name: Name, value: Value?)
Link copied to clipboard
fun Scheme.toJsonString(): String

Convert any type-safe configurator to json string

Link copied to clipboard
open override fun toMeta(): Laminate
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open fun validate(name: Name, meta: Meta?): Boolean