You are right but sometimes there are multiple reasons of shows getting canceled. For example, TSCC was kinda the best Sci-Fi show ever filmed(except Firefly probly) back in the 2008.
TSCC didn't have the best ratings but it was good enough(since there was nothing else to watch). Apparently, FOX and Warner Bros. had a great deal to run such an expensive show (with discounts for rights to FOX etc.), but it was after world crisis so studio that was filming this Terminator show was nearly bankrupt(borrowed too much money and went bankrupt at the end), so FOX didin't want to waste more money as finances were bad at the time, unless Warner Bros. would make a huge discount to finish the series. It didn't happen, studio went bankrupt, some rights of Terminator were sold out and Warner Bros. couldn't do anything to renew the show, even tho they really wanted FOX to finish this. It was just a bad luck, which is really sad :(