be barking up the wrong tree vs take something the wrong way

be barking up the wrong tree

take something the wrong way

How often have the words be barking up the wrong tree and take something the wrong way occurred in a corpus of books? (source: Google Ngram Viewer )