You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this dataset (a bit long, attach at the bottom), where it causes venn.js Cannot read property 'circle' of null error. at arcArea += circleArea(arc.circle.radius, arc.width);
I printed out the buggy loop data, it looks something like this: innerPoints = [{...parentIndex: [0, 2]...}, {...parentIndex: [1, 2]...}, {...parentIndex: [0, 2]...}, {...parentIndex: [1, 2]...}, {...parentIndex: [1, 3]...}, {...parentIndex: [1, 3]...}
When it decides to nest-loop the first and last element of the list, it can't find matching index and arc will end up with null, causing the arcArea += circleArea(arc.circle.radius, arc.width); to fail.
A quick fix is to add a conditional to avoid updating arcArea when arc is null, although I have no clue if this breaks the mathematics.
Can you please have a look at this? Many thanks.
The dataset
This seems to be caused when multiple circles intersect at nearly the same point - causing issues with the code that tries to figure out the intersection area. In your case this point occurs with the 'a', 'd', 'e', 'f' circles:
I have this dataset (a bit long, attach at the bottom), where it causes venn.js Cannot read property 'circle' of null error. at
arcArea += circleArea(arc.circle.radius, arc.width);
I printed out the buggy loop data, it looks something like this:
innerPoints = [{...parentIndex: [0, 2]...}, {...parentIndex: [1, 2]...}, {...parentIndex: [0, 2]...}, {...parentIndex: [1, 2]...}, {...parentIndex: [1, 3]...}, {...parentIndex: [1, 3]...}
When it decides to nest-loop the first and last element of the list, it can't find matching index and
arc
will end up withnull
, causing thearcArea += circleArea(arc.circle.radius, arc.width);
to fail.A quick fix is to add a conditional to avoid updating
arcArea
whenarc
is null, although I have no clue if this breaks the mathematics.Can you please have a look at this? Many thanks.
The dataset
The text was updated successfully, but these errors were encountered: