map_echart: Map Chart (with Timeline)

Description Usage Arguments Value

Description

Plot map using e_map. It will auto-detect the value_var name using information in option when the value_axis_name is not given. The chart's width is set "100%" and the height is set "800%" to make the map larger enougth to see. For visual map, the type is "continuous" and the upper bound is calculated automatically. The position of visual map is set to right and vertically centered.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
map_echart(
  data,
  map_json,
  timeline_var = NULL,
  value_var = "defective_rate_percent",
  value_axis_name,
  use_digits = TRUE,
  interval = 0,
  timeline_label_width = 50,
  toolbox_features = c("dataView", "saveAsImage", "restore")
)

Arguments

data

a data frame

map_json

A geo list containing map data

timeline_var

character. The variable indicating timeline.

value_var

character. The variable that will be displayed in cells in the chart.

value_axis_name

character. The name of value variable. If missing, the function will use information in option to auto-detect the name according to value_var.

use_digits

logical, default TRUE. Whether to use digits in formatter.

interval

numeric, default 0. The interval of label of timeline points.

timeline_label_width

numeric, default 50. The label text width of timeline points.

toolbox_features

character vectors, default c("dataView", "saveAsImage", "restore"). It controls the toolbox functions in echarts.

Value

an object of class echarts4r.


YuanchenZhu2020/antgreens documentation built on Dec. 18, 2021, 8:20 p.m.