Click events for Dashboard 2.0 widgets

I want to be able to chart trend data for values in ui-gauges and ui-text widgets. Currently I have separate buttons to open the chart dialogs. I want to just click on the widget to open the chart. I ended up creating a ui-template that generates on click events for the widgets. I have seen some previous posts about doing this, but I think I have a very easy to use solution that I wanted to share.