i want highlight whole path when click on node know whole story of specific node , here's example- http://bl.ocks.org/git-ashish/8959771 .
please check link , find function highlight path in javscript, take care please , function doesn't want, highlight links related clicked node , links related target nodes. want highlight links related clicked node.
d3 sankey - highlight connected paths start end
here's example of need, whole graph,what need is, when click on bangkok, highlight nodes in same raw bangkok in dataframe , highlight link climatechange , energyshortage, .... highlight infrastructure&ecosystems, , leadership&strategy, , .... that's want. here's picture showing nodes related bangkok using shiny analyze .
here's happens when use highlight_node_links in bl.ocks , linked question, , that's wrong, , doesn't show relation between nodes , bangkoks.
here's data bangkok show how columns related each other, , when use data, gonna generate second picture only.
structure(list(city = c("bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok", "bangkok" ), resiliencychallenge = c("climatechange", "climatechange", "climatechange", "climatechange", "climatechange", "infrastructurefaliure", "energyshortage", "pollution", "pollution", "pollution", "transportationsystemfailure", "transportationsystemfailure", "transportationsystemfailure", "transportationsystemfailure", "transportationsystemfailure", "transportationsystemfailure"), cri.dimesnsion.1 = c("infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "leadership & strategy", "leadership & strategy", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "infrastructure & ecosystems", "leadership & strategy"), implementation.time.frame = c("short-term", "short-term", "short-term", "short-term", "short-term", "mid-term", "long-term", "short-term", "short-term", "mid-term", "mid-term", "short-term", "short-term", "short-term", "short-term", "short-term" ), goal = c("goal13", "goal13", "goal13", "goal13", "goal13", "goal12", "goal12", "goal11", "goal11", "goal11", "goal11", "goal11", "goal11", "goal11", "goal11", "goal11")), .names = c("city", "resiliencychallenge", "cri.dimesnsion.1", "implementation.time.frame", "goal"), class = "data.frame", row.names = c(na, -16l))
Comments
Post a Comment