I have some graphs on my page. When the user drags his cursor over the picture, I’d like to show a horizontal line over the graph.

The one above is the starting point and the latter shows what should happen when the user points his cursor over the graph. The line should stay on the same level with the cursor, when it’s over the image.
Is this possible with Javascript, for example?
It is, you need e.g. a div box positioned at cursers Y value with 1px green border. Position has to be set to absolute. But you can’t paint directly in the image.