Add support for barcharts in preview

Move JS to a function, call it when preview is called to convert the
tables. Import magnacharta CSS and JS to admin.

https://www.pivotaltracker.com/story/show/55458220
Merge pull request #780 from ElliotJH/make-barcharts-work-on-preview

Add support for barcharts in preview

https://www.pivotaltracker.com/story/show/55458220