NEWS.md
120 | Output and render functions for using c3 within Shiny 130 | applications and interactive Rmd documents.
131 | 132 |c3Output(outputId, width = "100%", height = "100%") 135 | 136 | renderC3(expr, env = parent.frame(), quoted = FALSE)137 | 138 |
outputId | 143 |output variable to read from |
144 |
---|---|
width, height | 147 |Must be a valid CSS unit (like |
150 |
expr | 153 |An expression that generates a c3 |
154 |
env | 157 |The environment in which to evaluate |
158 |
quoted | 161 |Is |
163 |
Add bars to a C3 plot
129 | 130 |c3_bar(c3, stacked = FALSE, rotated = FALSE, bar_width = 0.6, 133 | zerobased = TRUE)134 | 135 |
c3 | 140 |c3 htmlwidget object |
141 |
---|---|
stacked | 144 |boolean place bars on top of each other |
145 |
rotated | 148 |boolean use to make x-axis vertical |
149 |
bar_width | 152 |numeric pixel width of bars |
153 |
zerobased | 156 |boolean |
157 |
c3
163 | 164 | 165 |169 |
Manually assign colors
129 | 130 |c3_color(c3, colors)133 | 134 |
c3 | 139 |c3 htmlwidget object |
140 |
---|---|
colors | 143 |character vector of colors |
144 |
c3
150 | 151 | 152 |156 |
Manually assign colours
129 | 130 |c3_colour(c3, colours)133 | 134 |
c3 | 139 |c3 htmlwidget object |
140 |
---|---|
colours | 143 |character vector of colours |
144 |
c3
150 | 151 | 152 |156 |
Create simple Donut charts
129 | 130 |c3_donut(c3, expand = TRUE, title = NULL, width = NULL, 133 | show = TRUE, threshold = NULL, format = NULL, ...)134 | 135 |
c3 | 140 |c3 htmlwidget object |
141 |
---|---|
expand | 144 |boolean expand segment on hover |
145 |
title | 148 |character |
149 |
width | 152 |integer pixels width of donut |
153 |
show | 156 |boolean show labels |
157 |
threshold | 160 |numeric proportion of segment to hide label |
161 |
format | 164 |character label js function, wrap character or character vector in JS() |
165 |
... | 168 |additional values passed to the donut label object |
169 |
c3
175 | 176 | 177 |181 |
Add lines to a C3 plot
129 | 130 |c3_line(c3, type, stacked = FALSE, connectNull = FALSE, 133 | step_type = NULL)134 | 135 |
c3 | 140 |c3 htmlwidget object |
141 |
---|---|
type | 144 |character type of line plot. Must be one of:
|
151 |
stacked | 154 |boolean |
155 |
connectNull | 158 |boolean connect null (missing) data points |
159 |
step_type | 162 |character, one of:
|
167 |
c3
173 | 174 | 175 |179 |
C3 Pie Charts
129 | 130 |c3_pie(c3, show = TRUE, threshold = NULL, format = NULL, 133 | expand = TRUE, ...)134 | 135 |
c3 | 140 |c3 htmlwidget object |
141 |
---|---|
show | 144 |boolean show labels |
145 |
threshold | 148 |numeric proportion of segment to hide label |
149 |
format | 152 |character label js function, wrap character or character vector in JS() |
153 |
expand | 156 |boolean expand segment on hover |
157 |
... | 160 |additional values passed to the pie label object |
161 |
c3
167 | 168 | 169 |173 |
For scatter plots options are defined in the `c3` function. Options are limited to x, y and groups
129 | 130 |c3_scatter(c3)133 | 134 |
c3 | 139 |c3 htmlwidget object |
140 |
---|
c3
146 | 147 | 148 |154 |
Use Viridis palette options
129 | 130 |c3_viridis(c3, pal = "D")133 | 134 |
c3 | 139 |c3 htmlwidget object |
140 |
---|---|
pal | 143 |character palette options |
144 |
c3
150 | 151 | 152 |156 |
For plots where stacking is required this function will 130 | define the columns to be stacked based on column headers.
131 | 132 |check_stacked(c3, stacked)135 | 136 |
c3 | 141 |c3 htmlwidget object |
142 |
---|---|
stacked | 145 |boolean |
146 |
c3 object
152 | 153 | 154 |Imports the pipe operator from magrittr.
129 | 130 |lhs %>% rhs133 | 134 |
lhs | 139 |a |
140 |
---|---|
rhs | 143 |a pie settings function |
144 |
151 |
Modify point options
129 | 130 |point_options(c3, show = TRUE, r = 2.5, expand = TRUE, 133 | expand.r = 1.75, select.r = 4)134 | 135 |
c3 | 140 |c3 htmlwidget object |
141 |
---|---|
show | 144 |boolean |
145 |
r | 148 |numeric radius of point |
149 |
expand | 152 |boolean |
153 |
expand.r | 156 |numeric multiplier for radius expansion |
157 |
select.r | 160 |numeric multiplier for radius expansion |
161 |
c3
167 | 168 | 169 |173 |data.frame(a = c(1,2,3,2), b = c(2,4,1,5)) %>% 171 | c3() %>% 172 | point_options(r = 5, expand.r = 2)