Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

chart_labels_text

Modify labels font settings


Description

Specify mappings from levels in the data to displayed text font settings.

Usage

chart_labels_text(x, values)

Arguments

x

an ms_chart object.

values

a named list of fp_text() objects to map data labels to. It is a named list, the values will be matched based on the names. If it contains only one fp_text() object, it will be associated to all existing series.

See Also

Examples

library(officer)

fp_text_settings <- list(
  serie1 = fp_text(font.size = 7, color = "red"),
  serie2 = fp_text(font.size = 0, color = "purple"),
  serie3 = fp_text(font.size = 19, color = "wheat")
)

barchart <- ms_barchart(
  data = browser_data,
  x = "browser", y = "value", group = "serie")
barchart <- chart_data_labels(barchart, show_val = TRUE)
barchart <- chart_labels_text( barchart,
  values = fp_text_settings )

mschart

Chart Generation for 'Microsoft Word' and 'Microsoft PowerPoint' Documents

v0.3.0
MIT + file LICENSE
Authors
David Gohel [aut, cre], ArData [cph], YouGov [fnd], Rokas Klydzia [ctb] (custom labels), David Camposeco [ctb] (chart_data_smooth function), Dan Joplin [ctb] (fix scatter plot data structure)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.