line

fun line(template: String): layerLabels

Specifies the string template to use in the annotation.

Parameters

template

A line template to show in the annotation. Variables and aesthetics can be accessed via a special syntax:

  • ^color for aes

  • @year for variable

  • @{number of cylinders} for variable with spaces in the name

  • @{square m^2} for variable with spaces and '^' symbol in the name

  • @nameWith^ for the variable with '^' symbol in its name

A '^' symbol can be escaped with a backslash, a brace character in the literal text - by doubling:

  • .line("text") -> "text"

  • .line("{{text}}") -> "{text}"

  • .line("@model") -> "mustang"

  • .line("{{@model}}") -> "{mustang}"