Converting Jira Report to Gadget

I created a report plugin for Jira and think it would be great as a gadget as well. Is there an easy way to convert between the two? Reports and gadgets seem really similar but I’m not exactly sure if the code is similar.