Simple HTML Canvas + JavaScript example.
Drawing lines on canvas and processing data in javascript.