In the case of Spain and Portugal they stripped the gdp of colonies like Brazil and south america from their data and recalculated based on their modern day country borders even though trade with these colonies was a huge component of global trade in 1820.
By 1820 Venezuala, Paraguay, Argentina, Chile and Columbia has already achieved independence from Spain. Mexico went in 1821; Ecuador, Paraguay and Peru in 1822; finally Peru in 1825. After that the only Spanish possessions in the new world were Puerto Rico and Cuba. So, at the point where this chart starts, the Spanish empire is already disintegrating, a process that is completed within a very few years.
The Brazilian story is a little bit more complicated, but basically similar. During the Napoleonic wars the Portuguese monarch and court moved to Brazil, and Brazil effectively became the centre of the Portuguese empire. Reflecting this status, in 1815 Brazil was elevated from a colony to a separate kingdom, parallel with the kingdom of Portugal. Brazil at this time already had a larger economy than Portugal (though that was not a high bar to cross; Portugal was very poor).
The Portuguese weren't very happy about this subordinate economic and political status. in 1820 there was a successful Liberal revolution in Portugal. The revolutionary govenment demanded that King João VI return to Lisbon. He did, but he left his son Pedro to govern Brazil as regent. This effectively made the two kindoms independent of one another. In 1822 the government Lisbon then demanded that Pedro also should return,; he refused, instead declaring the independence of the Empire of Brazil. There folllows a war of independence in which the Brazilians, aided by the British, are successful. Portugal recognises the independene of the Brazilian empire in 1825.
So, again, at the time this chart starts the Portuguese empire in the New World is in the process of disintegrating, and this is complete within a few years. (Portugal still has an empire; Angola, Mozambique, Goa, East Timor, etc . But, shorn of Brazil, it's a shadow of its former self.)
But this whole business of treating the empires of European countries as a single economy is a bit iffy anyway. They tended not to be a single integrated economy in the way that the economies of the colonising countries were. Empires were about political control, and the economic thrust of imperialism was generally not integration, but exploitation — acquiring ownership of assets in the colonies; extracting tax revenues from the colonies. The British governed India, but there was a separate Indian government, subordinate to but distinct from the British government, which set economic policy and made economic decisions for India. The decisions, of course, were made in Britain's interest, but Britain's interest generally did not lie in economic integration. "Imperial free trade" was a political slogan for some but it was never a policy, much less a reality; it would have threatened the wages and lving standards of British workers, since wages in India and elsewhere were much, much lower. Hence there were substantial economic barriers between the UK and its colonies and, frequently, between different British colonies. (For most of the nineteenth and early twentieth century the UK did more trade with Argentina than it did with India.) The different British possessions tended to have separate currencies, and colonial industries which might compete with industry in the UK were supressed (which is what happened to the Indian shipbuilding industry that Purple mentioned, and to its thriving textile industry).
In short, in economic terms empires were pretty much the opposite of what the EU is today. But the chart treats both the nineteenth century empires and the EU as a single economy. You can justify it on the basis of common political control of the diverse economies with an empire but, still, it's a bit misleading.