79195805

Date: 2024-11-16 18:25:50
Score: 2.5
Natty:
Report link

Thanks for your help! Here is a slightly modified code that produces the kind of figure I wanted:

p <- ggplot( data, aes(x, y) ) + geom_point_interactive( aes(data_id = facet) ) + facet_wrap_interactive( ~facet, interactive_on = "both", labeller = labeller_interactive( aes(data_id = facet) ) ) + theme( strip.background = element_blank(), strip.text.x = element_text( colour="black", size = 12) )

girafe( ggobj = p, options = list( opts_hover(""), opts_hover_inv(css = "opacity:0.1;") ) )

I think the problems were 1. mouse-over needs to be rather precisely on the text in the facet strip - here a single letter, 2. in the original code, data_id = facet was part of the global aestethics, but it seems it needs to be placed inside labeller_interactive to make the facets interactive

enter image description here

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): enter image description here
  • Whitelisted phrase (-0.5): Thanks for your help
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: ThomasW