on one's last legs vs terminally ill

on one's last legs

prep
  • About to die. 

  • About to lose viability or become defunct. 

terminally ill

adj
  • Having an incurable condition that will lead to death. 

How often have the words on one's last legs and terminally ill occurred in a corpus of books? (source: Google Ngram Viewer )