In my last post, I demonstrated two methods of constructing a Venn diagram in Xcelsius. The first method used a manipulation of the Bubble Chart object and the second method used the free Google Charts API. In this post, I will discuss the pros and cons of both methods.
Let’s begin with the Bubble Chart method. Recall that the Bubble Chart is identical to the XY Chart, except it allows for a third variable to define the size of each point. When I first began investigating Venn diagrams in Xcelsius, the Bubble Chart seemed like a natural starting point since it already does half the work for you. That is, it automatically resizes the “bubbles” to reflect the proportional difference between the two groups. The only thing I had to do was build Excel formulas to shift the bubbles together in order to show the correct amount of overlap. Unfortunately, that second part is very complex and makes for a big disadvantage compared to the Google Charts API.
It turns out the Bubble Chart object is not exactly consistent or easy to predict. Its movement and behavior varies depending on the overall size of the object and the size of the individual bubbles. Therefore, it takes some work to force the chart to display the correct overlap. What I did was arrange a series of experiments where I changed the parameters of the Venn diagram and then measured how much shift I had to apply in order to achieve the right overlap. I then took that data and used it to build a regression model. Then I plugged the model equation into my Excel spreadsheet and used it to calculate the amount of horizontal shift I needed in order to see the correct “bubble” overlap. Sure, it works, but it’s a lot more effort compared to calling up a simple Google Chart URL. Also, this only produces a Venn diagram with 2 sets, while Google Charts can easily produce a 3-set Venn diagram.
However, the Bubble Chart approach does have some advantages over Google Charts. Perhaps the most significant advantage is that Bubble Charts do not require an internet connection and can be used in a fully offline mode. When using Google Charts, your user must be connected to the internet and have the ability to access http://chart.apis.google.com
There’s also a potential security advantage to using Bubble Charts. If your organization has strict security protocols, it may not be permissible for you to pass information to an external party (i.e. Google). However, you might be able to get around that by opting not to pass data labels through the Google Charts URL and instead handling the labels from within Xcelsius. This means that you would only be passing simple aggregate numbers to Google without a corresponding label to indicate what that data is or where it came from.
In my opinion, you’ll always want to lean towards using the Google Charts API. It’s more flexible, easier to use, and it has more features than you could produce using a hacked Bubble Chart. However, if you need your dashboard to run offline or you have a security rule which prevents the transmission of any data whatsoever to a 3rd party, then you’ll need to use a Bubble Chart.