Skip to contents

Draw a bar range plot with labels on each end.

Usage

e_barRange(
  e,
  lower,
  upper,
  name = "barRange",
  legend = TRUE,
  y_index = 0,
  x_index = 0,
  barWidth = 10,
  borderRadius = 5,
  margin = 10,
  textSymbol = "F",
  ...
)

Arguments

e

An echarts4r object as returned by e_charts or a proxy as returned by echarts4rProxy.

lower, upper

series of lower and upper borders of the band

name

name of the serie.

legend

Whether to add serie to legend.

x_index, y_index

Indexes of x and y axis.

barWidth

width of each bar

borderRadius

roundness of the bar ends

margin

space between the text labels and the bar

textSymbol

string for the label to end with

...

additional options

Examples

df <- iris |>
  dplyr::group_by(Species) |>
  dplyr::summarise(min_length = min(Sepal.Length),
                   max_length = max(Sepal.Length))

df |> e_chart(Species) |>
  e_barRange(lower = min_length,
             upper = max_length,
             textSymbol = '"'
  )