ggiraph

ggiraph: tooltip with hyperlink?

风格不统一 提交于 2021-02-11 15:27:57
问题 I am trying to create an interactive scatterplot with ggiraph where the tooltip allows me to navigate to a webaddress (which pertains to the specific selected dot). Any idea whether this is actually possible and how to go about it? Many thanks for any advice! library(tidyverse) library(ggiraph) my_df <- data.frame(stringsAsFactors=FALSE, x = c(0.5, 0.1), y = c(0.2, 0.9), link = c("bbcnews.com", "nyt.com"), link_name = c("bbc news", "nytimes") ) my_plot <- my_df %>% ggplot()+ geom_point

ggiraph: tooltip with hyperlink?

帅比萌擦擦* 提交于 2021-02-11 15:26:23
问题 I am trying to create an interactive scatterplot with ggiraph where the tooltip allows me to navigate to a webaddress (which pertains to the specific selected dot). Any idea whether this is actually possible and how to go about it? Many thanks for any advice! library(tidyverse) library(ggiraph) my_df <- data.frame(stringsAsFactors=FALSE, x = c(0.5, 0.1), y = c(0.2, 0.9), link = c("bbcnews.com", "nyt.com"), link_name = c("bbc news", "nytimes") ) my_plot <- my_df %>% ggplot()+ geom_point

ggiraph htmlwidgets with bookdown and new_session = yes

耗尽温柔 提交于 2021-01-28 09:17:25
问题 This seems related to to rstudio/bookdown#15 but I haven't been able to figure pin it down. The example is here but the offending code is p2 <- ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point_interactive(aes(tooltip = car)) ggiraph(code = print(p2)) and my bookdown.yml has new_session: yes . Other htmlwidgets do work. ```r p2 <- ggplot(mtcars, aes(x = disp, y = mpg)) + geom_point_interactive(aes(tooltip = car)) ggiraph(code = print(p2)) ``` Session info: $ R R version 3.3.3 (2017-03-06) -

R FlexDashboard ggiraph chart not showing on second page of dashboard when using IE 11

橙三吉。 提交于 2019-12-12 04:31:14
问题 I have a multi-page R FlexdashBoard and I am trying to use ggiraph to create some interactive charts. They show up fine on the first page of the dashboard, however on the second page the SVG graphics do not show up until I hit refresh then the charts on the first page disappear. Also the text in the SVG graphics seems to only display intermittently. I only have this error in Internet Explorer - everything works fine in Chrome. The following code should recreate this error. Any help would be

R ggiraph - no plot when running .R file

一曲冷凌霜 提交于 2019-12-11 03:37:53
问题 How do I get the graph when executing a .R file? The file ( test.r ) looks like this: library(ggplot2) library(ggiraph) gg <- ggplot(data = mtcars, aes(x = mpg, y = wt, color = factor(cyl))) gg1 <- gg + geom_point_interactive(aes(tooltip = gear), size = 5) ggiraph(code = print(gg1)) I am running it with this command: R < test.R --no-save But nothing happens. If I just run R from the command line and enter the code line-by-line Firefox opens and shows a really nice graph with the wanted mouse