updated getLine function to line up with the ticks on an ordinal scale