jp_labs: Customize chart labels

Description Usage Arguments See Also Examples

View source: R/jp_labs.R

Description

Customizes the labels of Datawrapper line, bar and column charts, as well as scatter plots. Use notes to add a footnote to the chart. Add alt_text to ensure accessibility.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
jp_labs(
  chart_id,
  title = "",
  subtitle = "",
  notes = "",
  source_name = "",
  source_url = "",
  byline = "",
  jp_byline_prefix = TRUE,
  alt_text = ""
)

Arguments

chart_id

A string of the Datawrapper chart ID.

title

A string for the title.

subtitle

A string for the subtitle.

notes

A string for the notes at the bottom of the chart.

source_name

A string for the source name.

source_url

A string for the source URL.

byline

A string for the byline.

jp_byline_prefix

Defaults to TRUE. If FALSE, turn off the "JP/" prefix in the byline.

alt_text

A string for the alt text.

See Also

The underlying function: dw_edit_chart

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
jp_labs(
  chart_id = "abcD3",
  title = "COVID-19 deaths have started plateauing",
  subtitle = "Daily new COVID-19 deaths, West Java (7-day moving average)",
  source_name = "West Java administration",
  source_url = "https://pikobar.jabarprov.go.id/",
  byline = "Dzulfiqar FR",
  alt_text = "A line chart showing the downward trend in daily new COVID-19 deaths in West Java"
)

## End(Not run)

dzulfiqarfr/jpwrapper documentation built on Dec. 20, 2021, 2:20 a.m.