g.raphael
g.raphael copied to clipboard
2-area Venn diagrams
Hi there,
I have created a new diagram plugin for gRaphaël - 2-area Venn diagrams. It should basically behave like http://code.google.com/apis/chart/docs/gallery/venn_charts.html
for two sets. I may update the chart to include support for 3-areas in the future.
Oh, and it's MIT-licensed, so if you want to include it in gRaphaël, feel free :)
Use like this (include g.raphael.js and g.venn.js): //... var r = Raphael("area"); venn = r.g.venn(125, 125, 200, 200, {cardinalities: [10, 20], overlaps: [5]}, {gradients: ["45-#c00-#f55", "45-#0c0-#5f5", "45-#c00-#5f5"], strokewidth: 2}); //...
You can also use colors instead of gradients. The diagram also support the hover and the click event.
That's all, have fun!
Christian Blichmann
Raphael plugin system has changed since last commit, so it's not working anymore. I copied g.venn.js file and made needed changes, so it works with latest gRaphael now.
llamerr/g.raphael@e839e374a5502fd6186e10cf4084485d427c5712
Not sure if i need to make a new pull request for it?
Thanks for sharing :)