GGity v0.3.0 GGity.Element.Text View Source

Defines the data and functions used to style non-geom text elements.

CSS presentation attributes:

  • :family sets value of CSS font-family
  • :face sets value of CSS font-face
  • :color sets value of CSS fill
  • :size sets value of CSS font-size

Other attributes:

  • :angle sets the value passed to transform: rotate() for the purpose of rotating x axis tick labels (has no effect when set for other theme elements)

Link to this section Summary

Functions

Constructor for a Text element.

Link to this section Types

Specs

t() :: %GGity.Element.Text{
  angle: term(),
  color: term(),
  face: term(),
  family: term(),
  size: term()
}

Link to this section Functions

Link to this function

element_text(attributes)

View Source

Specs

element_text(keyword()) :: t()

Constructor for a Text element.

Setting the value of an attributed to nil will remove that property from the generated stylesheet altogether.

Calling element_text(attributes) is equivalent to struct(GGity.Element.Line, attributes).