Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sankey plot not showing in RPubs #722

Open
amandalee1005 opened this issue Nov 4, 2016 · 1 comment
Open

sankey plot not showing in RPubs #722

amandalee1005 opened this issue Nov 4, 2016 · 1 comment

Comments

@amandalee1005
Copy link

I tried to repopulate timelyportfolio's sankey plot on my machine and publish it. The plot works fine on my machine, but when I publish it to RPubs, the plot is not populated... I've tried to publish other plots, e.g. boxplots built using ggplot2, and they work completely fine.

Here is the code I used:
g <- graph.tree(40, children = 4)
E(g)$weight = 1
edgelist <- get.data.frame(g) #this will give us a data frame with from,to,weight
colnames(edgelist) <- c("source","target","value")

edgelist$source <- as.character(edgelist$source)
edgelist$target <- as.character(edgelist$target)
sankeyPlot2 <- rCharts$new()

sankeyPlot2$setLib('./rCharts_d3_sankey-gh-pages/')

sankeyPlot2$setLib('http:https://timelyportfolio.github.io/rCharts_d3_sankey/libraries/widgets/d3_sankey')
sankeyPlot2$set(
data = edgelist,
nodeWidth = 15,
nodePadding = 10,
layout = 32,
width = 960,
height = 500
)
sankeyPlot2

sankeyPlot2$publish('sankeyPlot2', host='rpubs')

@ramnathv
Copy link
Owner

ramnathv commented Nov 4, 2016

Look for the htmlwidgets based sankey charts in the NetworkD3 package. @timelyportfolio can help add more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants