New javascript with better tick positions