Description Usage Arguments Examples
create D3 pie charts
1 2 3 |
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' |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.