Learn R Programming

echarts4r (version 0.2.0)

e_lines: Lines

Description

Add lines.

Usage

e_lines(e, source_lon, source_lat, target_lon, target_lat,
  coord_system = "geo", name = NULL, rm_x = TRUE, rm_y = TRUE, ...)

e_lines_(e, source_lon, source_lat, target_lon, target_lat, coord_system = "geo", name = NULL, rm_x = TRUE, rm_y = TRUE, ...)

Arguments

e

An echarts4r object as returned by e_charts.

source_lon, source_lat, target_lon, target_lat

coordinates.

coord_system

Coordinate system to use, one of geo, or cartesian2d.

name

name of the serie.

rm_x, rm_y

Whether to remove x and y axis, defaults to TRUE.

...

Any other option to pass, check See Also section.

See Also

Additional arguments

Examples

Run this code
# NOT RUN {
flights <- read.csv(
  paste0("https://raw.githubusercontent.com/plotly/datasets/",
         "master/2011_february_aa_flight_paths.csv")
)

flights %>% 
  e_charts() %>% 
  e_geo() %>% 
  e_lines(
    start_lon, 
    start_lat, 
    end_lon, 
    end_lat,
    name = "flights",
    lineStyle = list(normal = list(curveness = 0.3))
   )

# }

Run the code above in your browser using DataLab