diff --git a/reports/demo-with-r/index.qmd b/reports/demo-with-r/index.qmd index 39cf420..952aa13 100644 --- a/reports/demo-with-r/index.qmd +++ b/reports/demo-with-r/index.qmd @@ -555,7 +555,13 @@ p <- ggplot(iris,aes(x=Sepal.Length,y=Petal.Length,colour=Species))+ tooltip_css <- "background-color:#e7eef3;font-family:Roboto;padding:10px;border-style:solid;border-width:2px;border-color:#125687;border-radius:5px;" -ggiraph(code=print(p),hover_css="cursor:pointer;stroke:black;fill-opacity:0.3",zoom_max=5,tooltip_extra_css=tooltip_css,tooltip_opacity=0.9) +girafe(code=print(p), + options=list( + opts_hover(css="cursor:pointer;stroke:black;fill-opacity:0.3"), + opts_zoom(max=5), + opts_tooltip(css=tooltip_css,opacity=0.9) + ) +) ``` ### dygraphs diff --git a/slides/demo/index.qmd b/slides/demo/index.qmd index 5ff66bd..e8aa583 100644 --- a/slides/demo/index.qmd +++ b/slides/demo/index.qmd @@ -1101,7 +1101,14 @@ p <- ggplot(iris,aes(x=Sepal.Length,y=Petal.Length,colour=Species))+ geom_point_interactive(aes(tooltip=paste0("Petal Length: ",Petal.Length,"\nSepal Length: ",Sepal.Length,"\nSpecies: ",Species)),size=2)+ theme_bw() tooltip_css <- "background-color:#f8f9f9;padding:10px;border-style:solid;border-width:2px;border-color:#125687;border-radius:5px;" -ggiraph(code=print(p),hover_css="cursor:pointer;stroke:black;fill-opacity:0.3",zoom_max=5,tooltip_extra_css=tooltip_css,tooltip_opacity=0.9,height_svg=2,width_svg=4,width=0.6) +girafe(code=print(p), height_svg=2, width_svg=4, + options=list( + opts_hover(css="cursor:pointer;stroke:black;fill-opacity:0.3"), + opts_zoom(max=5), + opts_tooltip(css=tooltip_css,opacity=0.9), + opts_sizing(width=0.6) + ) +) ``` ## Interactive time series • `dygraphs`