Custom circle colors
Jovans025 opened this issue · 1 comments
Jovans025 commented
I am having problem specifying color per circle, is there any documentation or way to do it?
malinamar commented
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).