You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be nice to be able to apply arbitrary css properties to objects that are then overwritten by explicit opts_hover(), opts_tooltip() and the like.
For example, in the below code, applying an opacity transition to opts_hover_inv() nicely transitions the non-hovered gears as expected. However, when not hovering, the inverted selection "snaps" back to full opacity. I believe this is because the css in opts_hover_inv() is only applied when the hover condition is met, so when not hovering, there is no transition property. It'd be nice to define transition as a higher level property so that the points transition back to full opacity as desired. This is non-interactive in github but you can run locally to see the effect described above.
Great package regardless!
library(ggplot2)
library(ggiraph)
#> Warning: package 'ggiraph' was built under R version 4.3.3plt<-
ggplot(mtcars,
aes(x=qsec,
y=hp,
data_id=gear,
tooltip= paste("Gear:", gear))) +
geom_point_interactive()
girafe(
ggobj=plt,
options=list(
opts_hover_inv(css="opacity:0.1;transition:opacity 1s;")
)
)
It'd be nice to be able to apply arbitrary css properties to objects that are then overwritten by explicit
opts_hover()
,opts_tooltip()
and the like.For example, in the below code, applying an opacity transition to
opts_hover_inv()
nicely transitions the non-hovered gears as expected. However, when not hovering, the inverted selection "snaps" back to full opacity. I believe this is because the css inopts_hover_inv()
is only applied when the hover condition is met, so when not hovering, there is no transition property. It'd be nice to define transition as a higher level property so that the points transition back to full opacity as desired. This is non-interactive in github but you can run locally to see the effect described above.Great package regardless!
Created on 2024-05-29 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: