Composition dependence of the charge-driven phase transition in group-VI transition metal dichalcogenides