There is a workaround, but that involves editing raphael.js
Locate the code block:
el.appendChild($("stop", {
offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%",
"stop-color": dots[i].color || "#fff"
}));
And replace it using:
el.appendChild($("stop", {
offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%",
"stop-color": dots[i].color || "#fff",
"stop-opacity": R.is(dots[i].opacity, "undefined") ? 1 : dots[i].opacity
}));
Update: Later figured out that I had accidentally missed a one-line change from my patch.
Next, locate the following line within the function R._parseDots
par[2] && (dot.offset = par[2] + "%");
and replace it with
dot.opacity = dot.color.opacity;
par[2] && (dot.offset = par[2] + "%");
With the above code, you can easily use something like myRect.attr("fill", "90-rgba(255,0,0,0.25)-rgba(0,255,0,0.75)-rgba(0,0,255,0.25)");
But note that the solution is for SVG output, VML does not support this. VML only supports a single opacity on gradient at 0% position and optionally a second opacity for the last opacity at 100% position. There would be a few more code changes for VML that I am not including here.
The code can be seen in action in the fiddle http://jsfiddle.net/shamasis/SYdJW/