benfred / venn.js

Area proportional Venn and Euler diagrams in JavaScript
MIT License
1.04k stars 219 forks source link

Uncaught initial bisect points must have opposite signs #16

Closed mpelikan closed 10 years ago

mpelikan commented 10 years ago

I have been having a problem with an exception being thrown from venn.js with various datasets. These datasets appear to be valid sets.

I have create a JSFiddle with a simplified example that generates the exception: http://jsfiddle.net/mpelikan/F8cL3

benfred commented 10 years ago

thanks for pointing this out - should be fixed by 44d0cf4472e559c5f0f745ce75ec8c8b352bc453

ylaizet commented 8 years ago

Hello,

I have the same error with the following data on the current master branch code:

Group1 : 66 Group2 : 86 Group3 : 573 Group1,Group2 : 9 Group1,Group3 : 66 Group2,Group3 : 86 Group1,Group2,Group3 : 9

It's related to the "Group1,Group3" which fully overlap the Group1. If I put 65 as value for "Group1,Group3", I get rid of the error.

Regards

benfred commented 8 years ago

Its working for me =(. This code:

var sets = [
{sets: ['Group1'], size: 66},
{sets: ['Group2'], size: 86},
{sets: ['Group3'], size: 573},
{sets: ['Group1','Group2'], size: 9},
{sets: ['Group1','Group3'], size: 66},
{sets: ['Group2','Group3'], size: 86},
{sets: ['Group1','Group2','Group3'], size: 9}]

var chart = venn.VennDiagram();
d3.select("#venn").datum(sets).call(chart);

Produces this output:

screen shot 2016-05-26 at 9 19 59 am
ylaizet commented 8 years ago

Hello,

my mistake indeed. I figured out that the conversion of my data to the variable sets was setting the size value as an array with the size value instead of a integer directly ( size: [66] ). I apologize for that and thanks.

Hadh commented 5 years ago

For future reference, this error could also be generated when you are passing your data as strings in the "Size" parameter: {sets: ['Group1'], size: "66" }, => generates : Uncaught initial bisect points must have opposite signs Make sure : size: 66