Skip to contents

Draw segmented doughnut.

Usage

e_doughnut(
  e,
  numerator = NULL,
  denominator = NULL,
  formatter = "{c}/{b}",
  fontSize = "10em",
  fontColor = "#555",
  center = c("50%", "50%"),
  radius = c("50%", "65%"),
  rm_x = TRUE,
  rm_y = TRUE,
  ...
)

Arguments

e

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

numerator, denominator

numeraetor to provide filled segments and denominator for total segments.

formatter

javascript string formatter for center text of chart.

fontSize, fontColor

font values for center text of chart.

center, radius

center provides relative position of the center of chart while radius provides the radius of your circle for outer segments.

rm_x, rm_y

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

...

Any other option to pass, check See Also section.

Examples



e_chart() |>
 e_doughnut(numerator = 3, denominator = 6)