Make Y-axis labels accuracy depend on graph

Now the values on Y-axis label and on graph points labels have variable accuracy (decimal places) depending on range of the values (difference between min and max value on the graph). It prevents situation shown on the image attached:

The first one shows current rounding - after zooming the graph you can't distinguish any of the values on the axis and graph points labels - they are all the same. The second one shows almost the same graph, but with dynamically scaled values (don't mind the units, I forgot to change to ms).

![values](https://cloud.githubusercontent.com/assets/3197917/3764001/1ae7a432-18ab-11e4-9bd2-d03d03c02f0f.png)

Explanation for automatic test failure - function for rounding numbers instead of number of decimals takes difference between min and max in graph as an argument and that makes the tests fail.
The purpose of the second argument is now changed - now it is not a number of decimal places (which did not work out - there was always '1' I think), but the difference between min and max value on graph (it is important for rounding values on Y axis to depend on it, since zooming the graph requires more precise values on axis). This is the place, where automatic tests fail, because they give number of decimal places in place of difference on graph.