epie: Add pie

Description Usage Arguments See Also Examples

View source: R/add.R

Description

Add pie chart

Usage

1
2
3
4
5
6
7
8
9
epie(p, serie, name = NULL, clickable = TRUE, legendHoverLink = TRUE,
  center = list("50%", "50%"), radius = list(0, "75%"),
  startAngle = 90, minAngle = 0, clockWise = TRUE, roseType = NULL,
  selectedOffset = 10, selectedMode = TRUE, z = 2, zlevel = 0, ...)

epie_(p, serie, name = NULL, clickable = TRUE, legendHoverLink = TRUE,
  center = list("50%", "50%"), radius = list(0, "75%"),
  startAngle = 90, minAngle = 0, clockWise = TRUE, roseType = NULL,
  selectedOffset = 10, selectedMode = TRUE, z = 2, zlevel = 0, ...)

Arguments

p

an echart object.

serie

value column name to plot.

name

of serie.

clickable

whether plot is clickable.

legendHoverLink

enables legend hover links.

center

coordinates of the center.

radius

radius in pixels or percent.

startAngle, minAngle

start and minimum angle.

clockWise

whether to display slices in clockwise direction

roseType

type of pie, takes NULL, area or radius, see examples.

selectedOffset

offset of selected slice.

selectedMode

whether slices are selectable.

z, zlevel

first and second grade cascading control, the higher z the closer to the top.

...

any other option to pass to serie.

See Also

official pie options docs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
pie <- data.frame(name = c("banana", "apple", "pineapple", "onion"),
  value = c(26, 15, 12, 9))

pie %>%
  echart(name) %>%
  epie(value)

pie %>%
  echart(name) %>%
  epie(value, roseType = "area") %>%
  etheme("helianthus")

pie %>%
  echart(name) %>%
  epie(value, roseType = "radius") %>%
  etheme("blue")

JohnCoene/echarts documentation built on May 4, 2018, 8:04 a.m.