Venn Diagram Missing Intersections

Hi everyone,

I’m currently working with a Highcharts Venn Diagram in QuickSight and I’ve run into an edge case that I can’t quite figure out.

Data structure

My dataset/Venn Diagram looks like this:

Using this data, I’m able to generate a Venn Diagram that correctly shows:

  • individual categories
  • pairwise intersections
  • the intersection of all three categories

The issue (edge case)

However, when I apply a filter that removes one of the pairwise intersections, the data ends up like this:

At this point, the Venn Diagram no longer draws the intersection of all three categories, even though there is clearly an All_categories value that includes CaTA | CatB | CatC.

In other words:

  • The chart works fine when all pairwise intersections exist
  • The chart fails to render the 3-way intersection when one of the 2-way intersections is missing

Chart configuration

Here is the chart code I’m using:

{
  "chart": {
    "type": "venn"
  },

  "tooltip": {
    "pointFormat": "<b>{point.name}</b><br/>Count: {point.value}"
  },

  "plotOptions": {
    "venn": {
      "opacity": 0.6,
      "borderColor": "#ffffff",
      "borderWidth": 2,
      "dataLabels": {
        "enabled": true,
        "format": "<div style=\"text-align:center;\">{point.name}</div>",
        "style": {
          "fontSize": "14px",
          "fontWeight": "600",
          "color": "#ffffff",
          "textOutline": "none"
        }
      }
    }
  },

  "series": [
    {
      "type": "venn",
      "data": [
        "map",
        ["getColumn", 0, 1, 2],
        {
          "sets": ["split", ["get", ["item"], 0], " | "],
          "name": ["get", ["item"], 1],
          "value": ["get", ["item"], 2]
        }
      ]
    }
  ]
}

Question

Is this a known limitation of Highcharts Venn diagrams (i.e., requiring all pairwise intersections to exist in order to render a multi-set intersection), or is there a way to force the diagram to render the CatA | CatB | CatC intersection even when one of the pairwise combinations is missing?

Any guidance or workaround would be greatly appreciated. Thanks in advance!

1 Like

Hi @mirandadinis70,

I am not too sure if this is a current limitation in High Charts where you need to have all of the sets being pair-wise. As a possible workaround, would it be possible to keep all of the sets pairwise, but the one you originally wanted eliminated have a 0 placeholder value and hidden from the visual? With this, it is built inherently different but still visually your desired result.

Let me know if this works!

1 Like

Hi @WLS-Luis,

Yes, I was aware of that possibility, but it would either force me to add noise to my existing dataset or require creating an entirely separate dataset just for that plot alone, which I’m trying to avoid.

Please let me know if i didn’t quite understand it right and thanks in advance!

Hi @mirandadinis70,

That is totally understandable. If you do end up deciding to follow that workaround though, I do agree that creating another dataset would be better for your use case, as you do not add noise to your original dataset. Moreover, you can add the new dataset to your analysis anytime so that you can create the desired Venn diagram.