We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6861130 commit e496b6fCopy full SHA for e496b6f
R/R2C3.R
@@ -5,14 +5,12 @@
5
#' @import htmlwidgets
6
#'
7
#' @export
8
-R2C3 <- function(message, width = NULL, height = NULL) {
+R2C3 <- function(data, width = NULL, height = NULL) {
9
10
# forward options using x
11
12
- message[["bindto"]] <- "#chart"
13
-
14
x = list(
15
- message = message
+ data = data
16
)
17
18
# create widget
inst/htmlwidgets/R2C3.js
@@ -13,6 +13,8 @@ HTMLWidgets.widget({
renderValue: function(el, x, instance) {
+ x.message.bindto = "#" + el.id;
+
var chart = c3.generate(x.message);
19
},
20
0 commit comments