How do I get a chart input from a user?

I would like to get a chart input from a user:

mockup

download bmml source – Wireframes created with Balsamiq Mockups

One way could be to let the user manually enter (X, Y) values like here but that doesn't seem like a good UX. How could I do that otherwise?

The time range would typically be hours running over a day, and the values somewhere between -22 and +22. The accuracy in granularity is not crucial but the more accurate the better.