Mapping the global phase diagram of quantum anomalous Hall effect