d3plus {d3plus}R Documentation

An 'htmlwidget' interface to the d3plus javascript chart library

Description

An 'htmlwidget' interface to the d3plus javascript chart library

This function provides 'D3Plus' methods from R console

Usage

d3plus(data, width = NULL, height = NULL, elementId = NULL)

Arguments

data

D3Plus need explicit specified data objects formatted as JSON, and this parameter passed it from R.

width

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

height

Same as width parameter.

elementId

Dummy string parameter. Useful when you have two or more charts on the same page.

Author(s)

Mauricio Vargas

Examples

dta <- data.frame(
         id = c("alpha", "alpha", "alpha", "beta", "beta", "beta"),
         x = c(4,5,6,4,5,6),
         y = c(7,25,13,7,8,13)
       )

d3plus() %>% d3p_data(dta) %>% d3p_type("bar")
d3plus() %>% d3p_data(dta) %>% d3p_type("hbar")
d3plus() %>% d3p_data(dta) %>% d3p_type("area")


[Package d3plus version 0.1.0 Index]