{"action":"opened","issue":{"url":"https://api.github.com/repos/DataKnowledge/visNetwork/issues/26","labels_url":"https://api.github.com/repos/DataKnowledge/visNetwork/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/DataKnowledge/visNetwork/issues/26/comments","events_url":"https://api.github.com/repos/DataKnowledge/visNetwork/issues/26/events","html_url":"https://github.com/DataKnowledge/visNetwork/issues/26","id":115566090,"number":26,"title":"How to customize elements like background, border, and opacity for individual nodes/edges?","user":{"login":"thercast","id":1043111,"avatar_url":"https://avatars.githubusercontent.com/u/1043111?v=3","gravatar_id":"","url":"https://api.github.com/users/thercast","html_url":"https://github.com/thercast","followers_url":"https://api.github.com/users/thercast/followers","following_url":"https://api.github.com/users/thercast/following{/other_user}","gists_url":"https://api.github.com/users/thercast/gists{/gist_id}","starred_url":"https://api.github.com/users/thercast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thercast/subscriptions","organizations_url":"https://api.github.com/users/thercast/orgs","repos_url":"https://api.github.com/users/thercast/repos","events_url":"https://api.github.com/users/thercast/events{/privacy}","received_events_url":"https://api.github.com/users/thercast/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-06T18:59:00Z","updated_at":"2015-11-06T18:59:00Z","closed_at":null,"body":"Hello, first I want to say thank you for creating such an innovative package for visualizing networks!  For some of my graphs I'd like to have some nodes have different background colors than others, and also be able to customize other aspects like the border.  Same concept for edges: I'd like to set for example the opacity of one edge to be smaller than others.  When I define the data frame with node information, it's easy to set the color for the node as a separate column, but when I try to add the individual attributes like background and border, there is no effect when I render the graph.  I know that the documentation for `visNodes` says to supply a named list containing the desired values for say background and border, but as far as I can tell this applies the settings to all nodes.  Is there a way to specify these types of attributes on a per-node basis?  Here's some example code I tried.  I'm running the latest version from CRAN.\r\n\r\n```r\r\nlibrary(visNetwork)\r\nlibrary(magrittr)\r\n\r\nnodes <- data.frame(id = paste0(\"node\", 1:5),\r\n                    label = paste0(\"node\", 1:5),\r\n                    shape = \"box\",\r\n                    background = c(\"green\", \"yellow\", \"yellow\", \"red\", \"red\"),\r\n                    border = \"black\")\r\n\r\nedges <- data.frame(\r\n  from = c(\"node1\", \"node2\", \"node2\", \"node3\", \"node4\", \"node5\"),\r\n  to = c(\"node2\", \"node3\", \"node5\", \"node4\", \"node5\", \"node4\"),\r\n  label = paste0(\"edge\", 1:6),\r\n  length = 400,\r\n  smooth = TRUE,\r\n  color = c(\"red\", \"blue\", \"blue\", \"blue\", \"blue\", \"blue\"),\r\n  opacity = c(0.1, 0.1, 1, 1, 1, 1))\r\n\r\nvisNetwork(nodes, edges) %>%\r\n  visEdges(arrows = \"to\", font = list(background = \"white\", size = 16)) %>%\r\n  visLayout(randomSeed = 7, hierarchical = FALSE, improvedLayout = TRUE)\r\n```"}}