Quinton de Kock’s extraordinary knock, in which he hit 100 runs in just 44 deliveries, completely outplayed the West Indies in the 2nd T20I.
Elgar remained unbeaten on 46 as South Africa need 122 more runs to level the Test series against India.
Johannesburg has been the fortress of the Indian cricket team for the last 29 years, having not lost a single Test at the venue.