Feature/how to guide for legend

We've started following a pattern of defining the controller function at the top of the file then registering it with the insightChartsControllers module at the bottom.  This makes the code a lot neater and easier to read I think.

See https://github.com/ScottLogic/insight/blob/gh-pages-dev/app/controllers/main.js for a simple example.