This demo shows how to make a dragable graph using the HTML canvas element.
You can find an extensive Canvas tutorial here: Canvas Tutorial.
Function Variable
Drag the graph around to move it.