There are plenty of examples on this site of using D3 for its visualization capabilities, whether from Excel, Apps Script or some other platform. I like D3 a lot, and now with the release of d3 v4, which is much more modular, you can use it server side from Apps Script.
Why would you ?
Well, D3 had plenty of polyfills for array functions and other goodies before they actually showed up in Apps Script, but in addition to that it also plenty of useful functions for manipulating arrays that are not implemented in Apps Script, but it also has many other functions for data manipulation and math problems.
You'll need the d3Gas library.
Then you can do this
var d3 = d3Gas.d3;
Since there are plenty of uses for this, I'll do a page on each one - links below
For more like this, see Google Apps Scripts snippets. Why not join our forum, follow the blog or follow me on twitter to ensure you get updates when they are available.
You want to learn Google Apps Script?
Learning Apps Script, (and transitioning from VBA) are covered comprehensively in my my book, Going Gas - from VBA to Apps script, available All formats are available now from O'Reilly,Amazon and all good bookshops. You can also read a preview on O'Reilly.
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Google Apps Scripts snippets >