I was trying to use Raphael JS graphics library. I would like to use the attribute gradient which should accept an object. Documentation says to refer to SVG specs. I found
UPDATE: Rewritten for the latest Raphael API:
Linear Gradient
The documentation for the new attr() API is found here.
attr()