pier: pier

Description Usage Arguments Examples

View source: R/pier.R

Description

create D3 pie charts

Usage

1
2
3
pier(data, width = NULL, height = NULL, header = NULL,
  sortOrder = "none", smallSegmentGrouping = FALSE, settings = NULL,
  ...)

Arguments

data

data.frame must contain colnames value, label and color

width

integer width, pixel-width

height

integer height, pixel-height

header

character, simple header above plot with no formatting. For more control use 'pier.title()'

sortOrder

character must be one of 'none', 'random', 'value-asc', 'value-desc' 'label- asc', 'label-desc'

smallSegmentGrouping

booleen option to combine segments below percent threshold

...

variables passed via ...

value

smallSegmentGrouping option threshold for grouping segments

valueType

smallSegmentGrouping option must be 'percentage' or 'value'

label

character smallSegmentGrouping option default is 'Other'

color

character smallSegmentGrouping option default is '#cccccc'

Examples

1
2
3
4
5
6
7
## Not run: 
data.frame(value = c(40, 20, 30),
           label = c('red', 'green', 'blue'),
           color = c('red', 'green', 'blue')) %>%
  pier()
  
## End(Not run)

mrjoh3/pier documentation built on June 18, 2021, 3:34 a.m.