Closed dkalisch closed 10 years ago
One issue is that the target/values start at 0 rather than 1. I've improved the documentation to clarify this.
Unfortunately, in the course of examining this issue I found what looks to be like a code break caused by a recent update of d3.js. I'll look into this over the next week or so.
Thanks for highlighting these issues.
Oh that would be great. I tried it with the 0 as well, although it should not make a difference, but it didn't work either.
Best, Dominik
On 14.10.2013, at 12:10, Christopher Gandrud notifications@github.com wrote:
One issue is that the target/values start at 0 rather than 1. I've improved the documentation to clarify this.
Unfortunately, in the course of examining this issue I found what looks to be like a code break caused by a recent update of d3.js. I'll look into this over the next week or so.
Thanks for highlighting these issues.
— Reply to this email directly or view it on GitHub.
Sorry for the delay. Luckily what I thought was a code break due to an update of d3.js was actually just an issue with my local install. So no worries about that.
Re your code: I modified your code a little bit to the following:
Links <- structure(list(source = c(1, 1, 2, 2, 2, 3),
target = c(0, 4, 3, 4, 0, 1),
value = c(2, 4, 1, 3, 3, 50)), .Names = c("source",
"target", "value"), row.names = c(NA, -6L), class = "data.frame")
Nodes <- structure(list(name = c("A", "B", "C", "D", "E"),
group = c(1, 2, 2, 3, 3)), .Names = c("name", "group"),
row.names = c(NA, -5L), class = "data.frame")
This should work. All I've done is start the target numbering from 0 rather than 1. This will be labeled A
in the resulting graph. I also have the name
category as character strings rather than factors. Other changes should be superficial.
Just let me know if you still have issues.
Hi Christopher,
Thanks for that package. I tried the examples you provided at your webpage http://christophergandrud.github.io/d3Network/ and they worked fine. However, I tried the same with my own data, but wasn't able to create the d3ForceDirected graph.
I tried this:
The created page doesn't show the graph. Do you have any suggestions? Thanks for your help.