Fixed bug with scale calculating min and max values
Added a limit to x label display length