jp_theme: Modify nondata components

Description Usage Arguments See Also Examples

View source: R/jp_theme.R

Description

Customize nondata components in Datawrapper line, bar and column charts, as well as scatter plots.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
jp_theme(
  chart_id,
  subtitle_color = "#757575",
  y_grid_labels = "inside",
  x_grid = "ticks",
  y_grid = "on",
  labeling = "off",
  jp_logo = FALSE,
  download_data = FALSE,
  download_image = FALSE
)

Arguments

chart_id

A string of the Datawrapper chart ID.

subtitle_color

Subtitle color. Defaults to #757575.

y_grid_labels

Grid label position. Defaults to inside.

x_grid

Grid lines on the x-axis. Defaults to ticks. For scatter plots, no-labels will show grid lines without axis labels and just-labels will display the axis labels without grid lines.

y_grid

Grid lines on the y-axis. Defaults to on. For scatter plots, no-labels will show grid lines without axis labels and just-labels will display the axis labels without grid lines.

labeling

Color legend. Defaults to off. If top, adds a color legend to the top of the chart. If right, label the data directly on the right side of the chart.

jp_logo

The Jakarta Post logo. Defaults to FALSE. If TRUE, adds the Post's logo to the right-bottom of chart.

download_data

Defaults to FALSE. If TRUE, adds a button to download the data to the bottom of the chart.

download_image

Defaults to FALSE. If TRUE, adds a button to download the chart as an image to the bottom of the chart.

See Also

The underlying function: dw_edit_chart

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
jp_theme(
  chart_id = "abcD3",
  subtitle_color = "#90A4AE",
  x_grid = "off",
  y_grid = "ticks",
  labeling = "top",
  jp_logo = TRUE,
  download_data = TRUE,
  download_image = TRUE
)

## End(Not run)

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