last 2 params in svg.viewbox are width and height and not maxx and maxy => adapted calculation to produce width and height