On October 2014, Dilma Rousseff got reelected as president of Brazil (wiki article on it). One year later, an impeachment against her started and by August 2016 she was removed from office.
All the process of the impeachment was quite controversial. For example we can read:
In May 2016, just after Senate voted to suspend Rousseff's presidential powers. A New York Times editorial voiced support for Rousseff's concerns about the integrity and possible ulterior motives of the politicians who voted for her impeachment, though it considered her defense "debatable".
The presidency of the country was then given to Michel Temer, whose popularity was been quite low. From Accused of corruption, popularity near zero – why is Temer still Brazil's president?:
If Brazil’s recent decline could be plotted in the falling popularity of its presidents, Michel Temer represents the bottom of the curve.
In 2010, Luiz Inácio Lula da Silva ended his second term with an 80% approval rating. In March 2016 – four months before she was impeached – his protege and successor Dilma Rousseff’s administration had a 10% rating.
Last month, the government of Temer, Rousseff’s former vice-president, plunged to 3% in one poll. Among under 24-year-olds, Temer’s approval hit zero.
After all of this, the presidential candidate Jair Bolsonaro got a 46% of the popular vote in the first round. Bolsonaro is described as nationalist and populist in nature, and he is an advocate of far-right policies (wiki). This, after Brazil having a leftist president on 13 of the last 15 years (Lula da Silva 2003-2011 and Dilma Rousseff 2011-2016, then Michel Temer 2016-2018).
All in all, my question is: to what extend did the impeachment turn politics in Brazil in a way that a completely different political view can gain majority?