I have been reading quite a bit on graphing libraries for Java and Javascript lately but I haven\'t found a good way to do what I want to do.
Essentially I have a hiera
Yes, this is a fairly well-studied problem. What you are describing is called a hypergraph. Each element can be represented as a vertex in a graph, and the sets are the hyperedges. The problem then becomes that of visualizing hypergraphs.
Unfortunately there isn't a perfect, generalized solution to this since even the simplest graphs can have complex visualizations.
If your sets are relatively small (< 5 elements), you can use a regular graph drawing library like graphviz. To do this, simply connect all pairs of vertices within each set and color them differently. This will yield a solution similar to this: