Layout

class Layout : Scheme

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion : SchemeSpec<Layout>

Properties

Link copied to clipboard

An annotation is a text element that can be placed anywhere in the plot. It can be positioned with respect to relative coordinates in the plot or with respect to the actual data coordinates of the graph. Annotations can be shown with or without an arrow.

Link copied to clipboard

Determines whether or not a layout width or height that has been left undefined by the user is initialized on each relayout. Note that, regardless of this attribute, an undefined layout width or height is always initialized on the first call to plot.

Link copied to clipboard

Sets the gap (in plot fraction) between bars of adjacent location coordinates.

Link copied to clipboard

Sets the gap (in plot fraction) between bars of the same location coordinate. Default: 0.

Link copied to clipboard

Enumerated, one of ( "stack" | "group" | "overlay" | "relative" ) Determines how bars at the same location coordinate are displayed on the graph. With "stack", the bars are stacked on top of one another With "relative", the bars are stacked on top of one another, with negative values below the axis, positive values above With "group", the bars are plotted next to one another centered around the shared location. With "overlay", the bars are plotted over one another, you might need to an "opacity" to see multiple bars. Default: "group".

Link copied to clipboard

Sets the normalization for bar traces on the graph. With "fraction", the value of each bar is divided by the sum of all values at that location coordinate. "percent" is the same but multiplied by 100 to show percentages. Default: "".

Link copied to clipboard

Sets the gap (in plot fraction) between boxes of adjacent location coordinates. Has no effect on traces that have "width" set. Default: 0.3

Link copied to clipboard

Sets the gap (in plot fraction) between boxes of the same location coordinate. Has no effect on traces that have "width" set. Default: 0.3

Link copied to clipboard

Determines how boxes at the same location coordinate are displayed on the graph. If "group", the boxes are plotted next to one another centered around the shared location. If "overlay", the boxes are plotted over one another, you might need to set "opacity" to see them multiple boxes. Has no effect on traces that have "width" set.

Link copied to clipboard

Sets the default calendar system to use for interpreting and displaying dates throughout the plot.

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

Determines the mode of drag interactions. "select" and "lasso" apply only to scatter traces with markers or text. "orbit" and "turntable" apply only to 3D scenes.

Link copied to clipboard

Sets the plot's height (in px). Number greater than or equal to 10, default: 450.

Link copied to clipboard

Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no looking for data). This is only a real distance for hovering on point-like objects, like scatter points. For area-like objects (bars, scatter fills, etc) hovering is on inside the area and off outside, but these objects will not supersede hover on point-like objects in case of conflict. Default: 20.

Link copied to clipboard

Determines the mode of hover interactions. If "closest", a single hoverlabel will appear for the "closest" point within the hoverdistance. If "x" (or "y"), multiple hoverlabels will appear for multiple points at the "closest" x- (or y-) coordinate within the hoverdistance, with the caveat that no more than one hoverlabel will appear per trace. If "x unified" (or "y unified"), a single hoverlabel will appear multiple points at the closest x- (or y-) coordinate within the hoverdistance with the caveat that no more than one hoverlabel will appear per trace. In this mode, spikelines are enabled by default perpendicular to the specified axis. If false, hover interactions are disabled. If clickmode includes the "select" flag, hovermode defaults to "closest". If clickmode lacks the "select" flag, it defaults to "x" or "y" (depending on the trace's orientation value) for plots based on cartesian coordinates. For anything else the default value is "closest".

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

Sets the background color of the paper where the graph is drawn. Default: #fff.

Link copied to clipboard

Sets the background color of the plotting area in-between x and y axes. Default: #fff.

Link copied to clipboard

Sets the decimal and thousand separators. For example, ". " puts a '.' before decimals and a space between thousands. In English locales, dflt is ".," but other locales may alter this default.

Link copied to clipboard
Link copied to clipboard

Determines whether or not a legend is drawn. Default is true if there is a trace to show and any of these: a) Two or more traces would by default be shown in the legend. b) One pie trace is shown in the legend. c) One trace is explicitly given with showlegend: true.

Link copied to clipboard

Sets the plot's title.

Link copied to clipboard

Sets the gap (in plot fraction) between violins of adjacent location coordinates. Has no effect on traces that have "width" set. Default: 0.3

Link copied to clipboard

Sets the gap (in plot fraction) between violins of the same location coordinate. Has no effect on traces that have "width" set. Default: 0.3

Link copied to clipboard

Determines how violins at the same location coordinate are displayed on the graph. If "group", the violins are plotted next to one another centered around the shared location. If "overlay", the violins are plotted over one another, you might need to set "opacity" to see them multiple violins. Has no effect on traces that have "width" set.

Link copied to clipboard

Sets the plot's width (in px). Number greater than or equal to 10, default: 700.

Link copied to clipboard
var xaxis: Axis
Link copied to clipboard
var yaxis: Axis

Functions

Link copied to clipboard
fun annotation(anBuilder: Text.() -> Unit)
fun annotation(an: Text)

Add a Text annotation to layout

Link copied to clipboard
fun Scheme.color(key: Name? = null): ReadOnlyProperty<Scheme, Color>
Link copied to clipboard
fun figure(shBuilder: Shape.() -> Unit)
fun figure(sh: Shape)

Add a Shape to layout

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 image(block: Image.() -> Unit)
fun image(image: Image)

Add an image to the layout

Link copied to clipboard
fun legend(block: Legend.() -> Unit)
Link copied to clipboard
fun margin(block: Margin.() -> Unit)
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 title(block: Title.() -> Unit)
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
Link copied to clipboard
fun xaxis(block: Axis.() -> Unit)
Link copied to clipboard
fun yaxis(block: Axis.() -> Unit)

fun yaxis(index: Int, block: Axis.() -> Unit)

Secondary y-axis. index must be 2 or more