g.raphael icon indicating copy to clipboard operation
g.raphael copied to clipboard

2-area Venn diagrams

Open cblichmann opened this issue 14 years ago • 2 comments

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

cblichmann avatar Dec 17 '10 11:12 cblichmann

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?

llamerr avatar Nov 13 '12 16:11 llamerr

Thanks for sharing :)

Aymkdn avatar Nov 13 '12 17:11 Aymkdn