I don't have mains electricity ONLY solar.
So yes I do it every day, but as with everything not quite as simple.
You have to be careful with discharging your battery bank.
Otherwise your batteries will last 6 months at best.
I get 4 years out of mine.
Firstly let me say that I live in the south of Spain, so I have plenty of sun.
And yet there is NOT enough sun in the winter. Winter being Dec, Jan, Feb, March.
The diagram that Tomjasz has provided is what you need. Or similar.
My concern is keeping my batteries in working order, for as long as possible.
How you need to workout what size batteries you need.
So your ebike battery charger is 2amps.
So you need to provide, 2amps of solar power, per hour that you are charging your ebike (which means you are discharging your solar battery bank).
With 4 200w panels you would get around 40amps of electricity (10Amp per panel)
That however is in perfect conditions; you do know that you live in this World and there is NO such thing as perfect.
I have 2 x 225AH 6volt batteries, in the winter these battery are NOT large enough to charge my ebike battery, without destroying these batteries.
As a rule of thumb.
10amps x 4 = 40amps
Half it in the summer.
In the summer if the sun is hot enough to burn (that you can feel the heat of the sun on your skin - then you have enough sun intensity to produce electricity.
So you want 2 amps per hour to charge your ebike battery!
Double it 4amps - you are taking 2 amps out of your battery immediately, so you need to put 4cin to stand still.
Then you have to think about how full is my battery bank so you need to put 2 amps in to actually put anything into your battery bank, so that is 6amps per hour.
So my batteries 225AH, @ 50% = 112.5 hours ÷ 2 = 55hours of actual sun to fill my batteries.
Don't forget, you have to tilt your panels into the sun, so that the sun is hitting the front of your panel to actually produce electricity.
Half it again in the winter.
So what do I do.
In the summer, I get sun from 10am till 10pm.
So I put my battery on a timer, for 2 hours, so I don't start charging (discharging my battery bank) until it has had at least 2 hours of sun.
Then it takes, 4 to 6 hours to charge my ebike battery, so now it is 5pm, lets say.
I have sun for another 5 hours, to put charge back into my battery bank.
I actually have 3 banks of 225AH batteries, with 18 solar panels, of between 5amps and 9amps.
I have 4 panels permanently connected to each bank, and then move the other spare panels to the battery bank, that needs charge,
In the winter to be able to charge my ebike, battery,
I PUT ALL 18 PANELS INTO 1 BATTERY BANK,
And I can only get sufficient sun from, 10am till 2pm, which then gives me 2 hours of little sun to put something into my battery bank.
I live in the south of Spain, where I have Good sun in the winter.
In England I don't think there is enough sun at all most days from Nov to April.
If you are in Canada, I imagine, I could NOT charge my ebike battery in 1 day.
Oh yes, when it rains, forget about putting charge into your batteries,
I have to run my engine to be able to watch TV on rainy days.
I hope this helps