Implements an algorithm to find good values for chart axis
