layerTooltips

class layerTooltips(variables: String)

Defines the format for displaying the value. The format will be applied to the mapped value in the default tooltip or to the corresponding value specified in the line template.

Examples

val n = 100
val m = 5
val rand = java.util.Random(42)
val data = mapOf("x" to List(n) { rand.nextInt(m) })
letsPlot(data) +
geomBar(
tooltips = layerTooltips().format("@x", "d").title("@x")
.line("count|@..count..")
) { x="x" }

Parameters

variables

Variable names to create a general multiline tooltip with. Useful for specifying the tooltip content quickly, instead of configuring it via the line() method.

Constructors

Link copied to clipboard
constructor(vararg variables: String)

Functions

Link copied to clipboard
fun anchor(position: String): layerTooltips

Specifies a fixed position for the general tooltip.

Link copied to clipboard

Consolidates "side" tooltips (if any) to a general tooltip.

Link copied to clipboard
fun format(field: String, format: String): layerTooltips

Defines the format for displaying the value. The format will be applied to the mapped value in the default tooltip or to the corresponding value specified in the line template.

Link copied to clipboard
fun line(template: String): layerTooltips

Specifies the string template to use in the multi-line tooltip.

Link copied to clipboard

Specifies a minimum width of a general tooltip in pixels.

Link copied to clipboard
fun title(template: String): layerTooltips

Specifies the string template to use as a title in the multi-line tooltip.