config_arcs: Configure arcs

Description Usage Arguments Examples

View source: R/opts.R

Description

Define options of the arcs.

Usage

1
2
config_arcs(p, stroke.color = "#DD1C77", stroke.width = 1,
  arc.sharpness = 1, animation.speed = 600, popup.on.hover = FALSE, ...)

Arguments

p

a datamaps object.

stroke.color

arc colors.

stroke.width

arc width.

arc.sharpness

arc sharpness.

animation.speed

arc draw speed in milliseconds.

popup.on.hover

whether to show tooltip.

...

any additional options.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
edges <- data.frame(origin = c("USA", "FRA", "BGD", "ETH", "KHM",
                               "GRD", "FJI", "GNB", "AUT", "YEM"),
    target = c("BRA", "USA", "URY", "ZAF", "SAU", "SVK", "RWA", "SWE",
               "TUV", "ZWE"))

edges %>%
    datamaps() %>%
    add_arcs_name(origin, target) %>%
    config_arcs(stroke.color = "blue", stroke.width = 2, arc.sharpness = 1.5,
                animation.speed = 1000)

JohnCoene/datamaps documentation built on May 17, 2018, 12:17 p.m.