Hook in tooltip

Displays the source code on hover. Currently working on the issue with
line breaks.
Fix newline tooltip issue

Updates the style to use the tooltip content as-is, instead of removing
linespacing.

Also updates the buttons to display on-click instead of mouse over. The
tooltips will disappear when mousing away.
Small code tidy-ups

Removes some of the more verbose parts of the snippet code, as it was
making the tooltip excessively large.

Also changes the </br> tag in the bubble chart on-chart-tooltip for a
"\n", as this was being interpreted by the show-code-tooltip as HTML to
apply, rather than as something to be in text.