Gasoline engines are around 30-35% efficient, the rest is lost as heat. That goes for whether they’re spinning an alternator as part of an engine-generator set or just moving a vehicle.
You can’t get more than 35-40% efficiency so converting to electricity is a wash, you lose the energy to heat no matter what.
Also, the chart does not take into account how the electricity for the EV is generated, it would be just as inefficient as the gasoline car if the electricity was generated by burning hydrocarbons, but that detail is left out.
To get those types of numbers you would have to be charging from a grid that is nearly 100% coal. Real grids heavily favor EVs.