Legend

class Legend : Scheme

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion : SchemeSpec<Legend>

Properties

Link copied to clipboard

Sets the legend background color. Defaults to paper_bgcolor.

Link copied to clipboard

Sets the color of the border enclosing the legend. Default: #444.

Link copied to clipboard

Sets the width (in px) of the border enclosing the legend. Default: 0.

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

Sets the font used to text the legend items.

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

Sets the orientation of the legend (vertical/horizontal). Default: vertical.

Link copied to clipboard

The order at which the legend items are displayed. "normal": top-to-bottom in the same order as the input data. "reversed": the items are displayed in the opposite order.

Link copied to clipboard
var x: Number

Number between or equal -2 and 3. Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.

Link copied to clipboard

Sets the legend's horizontal position anchor. This anchor binds the x position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for x values greater than or equal to 2/3, anchors legends to the left for x values less than or equal to 1/3 and anchors legends with respect to their center otherwise. Default: left.

Link copied to clipboard
var y: Number

Number between or equal to -2 and 3. Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.

Link copied to clipboard

Sets the legend's vertical position anchor. This anchor binds the y position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for y values less than or equal to 1/3, anchors legends to at their top for y values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.

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
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