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

chart_data_labels

Modify data labels settings


Description

Data labels show details about data series. This function indicate that data labels should be displayed. See chart_labels_text() for modifying text settings associated with labels.

Usage

chart_data_labels(
  x,
  num_fmt = "General",
  position = "ctr",
  show_legend_key = FALSE,
  show_val = FALSE,
  show_cat_name = FALSE,
  show_serie_name = FALSE,
  show_percent = FALSE,
  separator = ", "
)

Arguments

x

an ms_chart object.

num_fmt

character(1): number formatting specifies number format properties which indicate how to format and render the numeric values. It can be "General", "0.00", "#,##0", "#,##0.00", "mm-dd-yy", "m/d/yy h:mm", etc.

position

character(1): it specifies the position of the data label. It should be one of 'b', 'ctr', 'inBase', 'inEnd', 'l', 'outEnd', 'r', 't'. When grouping is 'clustered', it should be one of 'ctr','inBase','inEnd','outEnd'. When grouping is 'stacked', it should be one of 'ctr','inBase','inEnd'. When grouping is 'standard', it should be one of 'b','ctr','l','r','t'.

show_legend_key

show legend key if TRUE.

show_val

show values if TRUE.

show_cat_name

show categories if TRUE.

show_serie_name

show names of series if TRUE.

show_percent

show percentages if TRUE.

separator

separator for displayed labels.


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.