There are so many factors such as where you live, the amount of roof area, whether there are trees blocking it, what time of day you would charge, etc. that it is hard to generalize.
That said, many people that go solar and have EVs find it a better deal to connect their solar panels to their house and grid. They sell any excess they generate during the day to the utility at a higher rate per KWh than they pay to charge their EV at night. (In some places they pay up to 5 times more for KWh during the day then they charge at night.)
EV charging is about 5% of my electric bill in the summer and maybe 10-15% in the winter (Natural gas heat). When you look at it systemically, it’s kind of like having an electric oven on for an hour or two every night. Probably not worth a solar system just for that.