#587 Graph labeling issue

Graphs with large labels cause the graph to be pushed outside the svg bounds and hidden.

This is caused by the tick width test which adds hidden tags to the html body element to check their size. However by adding to the body they can wrap around if all the labels together are longer than the size of the HTML page, this wrapping happens within a tick label element which then returns a width of the size of the page (because it starts at one side and wraps back to the other).

By adding the hidden tick elements to the svg element they don't have the same flow logic applied by the browser and return the correct size.

There seem to be some other areas which use the same method to test sizes, and these might also benefit from using the SVG tag as element which they are added to.