importing ggiraph to blogdown (htmlwidget)

What is the best way to import a saved ggiraph plot from one R Project to another to use it in a blogdown post?

I am struggling to adequatly import previously exported ggiraph plots to my blogdown post (saved with htmlwidget and widgetframe). The issue is that resizing the browser either introduces excessive space under the plot or causes the plot to grow horizontally beyond the (text) borders.

The author of ggirpah was kind enough on github to draw my attention to iframes, but it hasn't yet worked for me. I also gave widgetframe a try as suggested on the blogdown site.

Here are my attempts. Resize the browser and you'll see that the imported graph resize differently than when using the ggiraph 'natively', meaing when it is produced directly in the same RProject.

I hope I am missing something obvious, but I am a bit surprised how difficult it is to get this right. Many thanks!

update - just corrected the link to demonstrate the issue.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.