Thanks for your question.
I don't think so. The parable in question says:
Matthew 7:6 Do not give what is holy to the dogs; nor cast your pearls before swine, lest they trample them under their feet, and turn and tear you in pieces.
The key here is that "swine" are actively opposed to you and may actually be predisposed to a violent reaction.
The situation you describe is actually commended by the Lord. We should persist in doing good to others even if they seem unappreciative.