Elon Musk's electric car company was forced to shut its Shanghai factory for most of March, reducing its overall production.