autoline_shiny {lareshiny}R Documentation

Automatically wrap ggplot2 texts depending on rendered size

Description

This function automatically adapts the length of a title or subtitle text so that it wraps long texts in separate lines. This is useful to avoid trimming long texts when the rendered shiny size is shorter.

Usage

autoline_shiny(session, text, plot_name, font_size = 14, n = 1.6)

Arguments

session

Shiny's session object.

text

Character. Text for the title or subtitle or any text to be wrapped.

plot_name

Character. The name of the output plot.

font_size, n

Numeric. Values to help calculate a proxy of length.

Value

Character. String with wrapped values.


[Package lareshiny version 0.0.3 Index]