Made svg generator only print significant digits (up to 3)