Triple point of the lock-in and onset transitions of charge-density waves