Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom circle colors #158

Open
Jovans025 opened this issue Oct 1, 2021 · 1 comment
Open

Custom circle colors #158

Jovans025 opened this issue Oct 1, 2021 · 1 comment

Comments

@Jovans025
Copy link

I am having problem specifying color per circle, is there any documentation or way to do it?

@malinamar
Copy link

Had same problem and I used "venn-data-sets" data-attribute of each circle and pass it as selector in jQuery. Like this:

var colors = {$colors}
 $.each(data, function (index, value) {
   if (typeof value["label"] !== 'undefined') {
     var diagramSet = $("#venn_diagram [data-venn-sets=\"" + index + "\"]")
     diagramSet.find("path").css("fill", colors[index]);
   }
 });

That "if" is there only to select full circles from my data (don't want intersections..they are colored by full circles and its opacity).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants