If you are reading this in 2015, you probably won't have come across caja, since you'll be using this, as was announced today
For those of us still in 2014, this represents a major step in the capabilities of HTMLservice. Although it was posted with an emphasis on efficiency improvements, what it really means is that finally we can create UI's which are not restricted in the way that we have been up to now with Caja.
As an example, I was able to port Eurovision results with crossfilter and dc.js straight into a spreadsheet sidebar. Previously this was not possible, since the libraries it uses d3.js and dc.js would have been blocked by caja code sanitization for a number of reasons, including their use of <svg>
Here's a snap of it running in a sidebar.
This happens to use the all time eurovision song contest voting results to show bias of countries voting for each other, but you just substitute any data where you want to analyze co-occurrence. You can take a copy here
See more like this in Eurovision results with crossfilter and dc.js
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Embedding stuff in sites >