Skip to content

Commit

Permalink
Switch to d3r (fixes #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
fbreitwieser committed Mar 21, 2018
1 parent a7c3a21 commit 1dee736
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 18,938 deletions.
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ Package: sankeyD3
Type: Package
Title: D3 JavaScript Sankey Graphs from R
Description: Creates 'D3' 'JavaScript' Sankey graphs from 'R'.
Version: 0.3.1
Date: 2016-11-18
Version: 0.3.2
Date: 2017-03-21
Authors@R: c(
person("Florian","Breitwieser", email = "[email protected]", role = c("aut","cre")),
person("Christopher", "Gandrud", role = "aut"),
person("J.J.", "Allaire", role = "aut"),
person("Kenton", "Russell", role = "aut"),
person("Mike", "Bostock", role = c("aut", "cph")
, comment = "d3.js library, http://d3js.org"
),
person("B.W.", "Lewis", role = "ctb"),
person("Kevin", "Kuo", role = "ctb"),
person("Charles", "Sese", role = "ctb"),
Expand All @@ -22,6 +25,7 @@ License: GPL (>= 3)
Depends:
R (>= 3.0.0)
Imports:
d3r,
htmlwidgets (>= 0.3.2),
shiny,
magrittr
Expand Down
16 changes: 15 additions & 1 deletion R/sankeyNetwork.R
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,24 @@ sankeyNetwork <- function(Links, Nodes, Source, Target, Value,
# create widget
htmlwidgets::createWidget(name = "sankeyNetwork", x = list(links = LinksDF,
nodes = NodesDF, options = options), width = width, height = height,
htmlwidgets::sizingPolicy(padding = 10, browser.fill = TRUE),
sizingPolicy = htmlwidgets::sizingPolicy(padding = 10, browser.fill = TRUE),
dependencies = list(d3r::d3_dep_v4(), sankey_dep()),
package = "sankeyD3")
}

#' @keywords internal
sankey_dep <- function() {
htmltools::htmlDependency(
name = "sankey",
version = "0.1",
src = c(
file = system.file("htmlwidgets/lib/d3-sankey/src", package="sankeyD3")
),
script = "sankey.js"#,
#stylesheet = "d2b_custom.css"
)
}

#' @rdname sankeyD3-shiny
#' @export
sankeyNetworkOutput <- function(outputId, width = "100%", height = "500px") {
Expand Down
1,166 changes: 0 additions & 1,166 deletions inst/htmlwidgets/lib/d3-4.2.7/API.md

This file was deleted.

1,367 changes: 0 additions & 1,367 deletions inst/htmlwidgets/lib/d3-4.2.7/CHANGES.md

This file was deleted.

27 changes: 0 additions & 27 deletions inst/htmlwidgets/lib/d3-4.2.7/LICENSE

This file was deleted.

45 changes: 0 additions & 45 deletions inst/htmlwidgets/lib/d3-4.2.7/README.md

This file was deleted.

Loading

0 comments on commit 1dee736

Please sign in to comment.