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