Skip to content

Commit e496b6f

Browse files
committed
take bindto out of R
1 parent 6861130 commit e496b6f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

R/R2C3.R

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
#' @import htmlwidgets
66
#'
77
#' @export
8-
R2C3 <- function(message, width = NULL, height = NULL) {
8+
R2C3 <- function(data, width = NULL, height = NULL) {
99

1010
# forward options using x
1111

12-
message[["bindto"]] <- "#chart"
13-
1412
x = list(
15-
message = message
13+
data = data
1614
)
1715

1816
# create widget

inst/htmlwidgets/R2C3.js

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ HTMLWidgets.widget({
1313

1414
renderValue: function(el, x, instance) {
1515

16+
x.message.bindto = "#" + el.id;
17+
1618
var chart = c3.generate(x.message);
1719
},
1820

0 commit comments

Comments
 (0)