Sorry, I overlooked that this was for Shiny. There is a separate guide for Shiny reprexes:
I don't use Shiny, so hopefully somebody else can help you, but as a general piece of advice it is best to generate the plots you want outside of Shiny first to ease the process.