No, there's an important difference between 'illegal' and 'illegitimate'. "Legal" means something like "in accordance with the law". But "legitimate" in politics means "acknowledged by the population as right and proper. Thus, when dictators rig elections, they end up being legal but not legitimate.
The election of Mr. Trump was absolutely legal. But inasmuch is it awarded victory to a minority of Americans, in violation of fundamental democratic principles, it is rightly perceived as illegitimate.