{"action":"closed","issue":{"url":"https://api.github.com/repos/davidgohel/ggiraph/issues/90","repository_url":"https://api.github.com/repos/davidgohel/ggiraph","labels_url":"https://api.github.com/repos/davidgohel/ggiraph/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/davidgohel/ggiraph/issues/90/comments","events_url":"https://api.github.com/repos/davidgohel/ggiraph/issues/90/events","html_url":"https://github.com/davidgohel/ggiraph/issues/90","id":302420196,"number":90,"title":"geom_bar_interactive displays NA values in tooltip when using position \"dodge\"","user":{"login":"CRG180","id":33331944,"avatar_url":"https://avatars0.githubusercontent.com/u/33331944?v=4","gravatar_id":"","url":"https://api.github.com/users/CRG180","html_url":"https://github.com/CRG180","followers_url":"https://api.github.com/users/CRG180/followers","following_url":"https://api.github.com/users/CRG180/following{/other_user}","gists_url":"https://api.github.com/users/CRG180/gists{/gist_id}","starred_url":"https://api.github.com/users/CRG180/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CRG180/subscriptions","organizations_url":"https://api.github.com/users/CRG180/orgs","repos_url":"https://api.github.com/users/CRG180/repos","events_url":"https://api.github.com/users/CRG180/events{/privacy}","received_events_url":"https://api.github.com/users/CRG180/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-05T18:59:01Z","updated_at":"2018-03-18T09:38:59Z","closed_at":"2018-03-18T09:38:59Z","author_association":"NONE","body":"I'm running into a problem with `ggiraph`.  Most of the bars when using the tooltip appear as NA values.  I want the tooltip to display the sum of `disp` for each `as.factor(gear)` by every `as.factor(cyl)` using the `position = \"dodge\"` in `geom_bar_interactive`.  The picture below is a screenshot of my cursor over one of the bars.  The tooltip output = NA.  Note I'm using `mtcars` as dummy data. Therefore, the graph may not make a whole lot of sense practically. \r\n\r\n```{r}\r\nlibrary(ggplot2)\r\nlibrary(ggiraph)\r\n\r\nd7 <-ggplot(data = mtcars, aes(x= as.factor(cyl), y= disp)) +\r\n  labs(title = \"Total Disp by Cyl and Gear\",\r\n       subtitle = \"Cars for fun\",\r\n       x = \"Cyl\", y = \"Disp\") +\r\n  guides(fill=guide_legend(title=\"Gear\")) +\r\n  scale_fill_manual(values =  c(`3` = \"#f7831d\",`4` = \"#ef1cd0\",`5` = \"#0036f9\"), na.value = \"black\")\r\n\r\nmy_gg5 <- d7+geom_bar_interactive(aes(tooltip = disp , data_id =as.factor(cyl), \r\nfill = as.factor(gear)), \r\ncolor = \"black\", stat=\"summary\", fun.y =\"sum\", position = \"dodge\")\r\n\r\nggiraph(code = print(my_gg5),hover_css = \"fill:green\")\r\n```\r\n![ggirph screen shot](https://user-images.githubusercontent.com/33331944/36993328-2ad45a1a-2073-11e8-9ac2-9a9863fd3a8d.png)\r\n\r\n"}}
{"actor":{"display_login":"davidgohel"}}