bar_group_echart: Grouped Bar Chart (with Timeline)

Description Usage Arguments Value

Description

Plot grouped bar charts using e_bar. This function uses datazoom toolbox with type "inside". And the type of trigger is set to "axis" with axis pointer type "shadow". For data label, it uses "bold" font weight to make the data label more clear.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
bar_group_echart(
  data,
  timeline_var = NULL,
  x_var,
  bar_var,
  bar_name,
  sec_y_axis = FALSE,
  main_lower_bound,
  main_upper_bound,
  emphasis_type = c("series", "none", "self"),
  show_labels = FALSE,
  label_fontsize = 12,
  toolbox_freatures = c("saveAsImage", "restore")
)

Arguments

data

a data frame

timeline_var

character. The variable indicating timeline.

x_var

character. The variable that will be the X axis in the chart.

bar_var

character vector. The variables that will be used to draw grouped bar chart.

bar_name

character vector. The name of these variables in bar_var.

sec_y_axis

logical, default FALSE. Whether to use secondary Y axis.

main_lower_bound

numeric. The lower bound of main Y axis.

main_upper_bound

numeric. The upper bound of main Y axis.

emphasis_type

character, default to use "series" as the emphasis type in echarts. see parameter emphasis in e_bar.

show_labels

logical, default FALSE. Whether to show data label in each bar.

label_fontsize

numeric, default 12. The font size of data label.

toolbox_freatures

character vectors, default c("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.