Data Setup

library(pier)

data <- data.frame(label = c('Environment','Education','Business','Community'),
                   value = c(104,19,638,1250),
                   color = c("#A6CEE3","#1F78B4","#B2DF8A","#33A02C"))

Usage with Standard Defaults

pier(data)

Small Groupings

Currently this feature works as expected but the labels are lost.

data %>%
    pier(smallSegmentGrouping = TRUE, value = 10)

Advanced Usage

data %>%
    pier() %>%
    pie.size(inner=70, outer=100, width=700, height=500) %>%
    pie.header(text='Segments', font='Impact', location='pie-center') %>%
    pie.subtitle(text='by Type') %>%
    pie.footer(text='Economic Segments using fake data.',
               location = 'bottom-left') %>%
    pie.tooltips()


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