benfred / venn.js

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

Is there a way to programmatically get a list of intersections not shown. #161

Open jonborchardt opened 1 year ago

jonborchardt commented 1 year ago

When the layout decides to not make an overlap because the circle does not fit, I would like to tell the user with a little alert. Is this data queryable?

jacobmgreer commented 1 year ago

Or would it be possible to generate a table of the displayed intersections? From that it might be easier to highlight a table of intersections not displayed.

jacobmgreer commented 1 year ago

I do see in the DOM that it logs with warnings about the intersections not displayed on screen, this might be a way to identify what's not shown. "[Log] WARNING: area AFI1,AFI2,NBR,EBERT,LAFCA,NSFC,NYFCC,NYT not represented on screen (venn.js, line 1737)"

jacobmgreer commented 1 year ago

Here is an example of using the warning logs to create a list of the intersections not shown: https://jacobmgreer.github.io/Film-Tracker/VennDiagram/

jonborchardt commented 1 year ago

i would not have thought to overwrite console.log, for the specific need, this is cleaver!

it still seems reasonable for the developers to make this data available.