Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Venn Diagram in Qlikview using google chart api

sushil353
Honored Contributor II

Venn Diagram in Qlikview using google chart api

Hi All,

QlikView has always had a great selection of chart objects to allow us to display data. There are various graphical charts and two table charts available to show case data.

There has always been demand for new chart types but many of which would only be used in specific circumstances. The same situation i faced when in one of my requirement has Venn diagram.

We all know that qlikview is a very flexible and dynamic tool.. and it proves its capability this time.

So, how to create a venn diagram.??. i got the answere from google chart api.

Yes, We can use google chart api in qlikview.!!

So first discuss about google chart:

The Google Chart API is a tool that lets web application developers create charts from some data and embed it in a web pages

Many types of charts are supported, and by making the request into an image tag, people can simply include the chart in a web page.

URL: http://chart.apis.google.com/chart?

Venn Diagram Google Chart:  Detailed description about venn diagram is given in the below link

Venn Charts - Image Charts (Deprecated) — Google Developers

Scenario: i have a data set for which i need to make the venn diagram:

i have persons list and the language details, they can speek. i need to show case the language in the venn diagram

Person English Hindi Jermen
AdilNNY
AndreeNYN
ErikYNY
FrustukNNY
JeremyYNN
JonYNN
ShreyaYYN

Steps to implement Venn Diagram in Qlikview:

Step 1: calculate the following variable to get the values for various langauge spoken by persons and the common values.

so the variables would be

1. vE =Count({<English={'Y'}>}Person)

2. vH =Count({<Hindi={'Y'}>}Person)

3. vJ =Count({<Jermen={'Y'}>}Person)

4. vEH =Count({<Hindi={'Y'},English={'Y'}>}Person)

5. vEJ =Count({<Jermen={'Y'},English={'Y'}>}Person)

6. vHJ =Count({<Hindi={'Y'},Jermen={'Y'}>}Person)

7. vEHJ =Count({<Hindi={'Y'},English={'Y'},Jermen={'Y'}>}Person)

Step 2: Create a straight table and add the below expression:

='http://chart.apis.google.com/chart?cht=v&chs=330x220&chdl=English - '&$(vE)&'|Hindi - '&$(vH)&'|Jermen - '&$(vJ)&'&&chco=8DAACB,FC7362,BBD854&chd=t:'

&$(vE)&','&$(vH)&','&$(vJ)&','&$(vEH)&','&$(vEJ)&','&$(vHJ)&','&$(vEHJ)

in the above url

cht=v define the chart type,

chs define the size of chart

chdl define dimension lable

chco define chart color

chd define the chart data.

>> Make display option in expression tab as image

>> Presentation tab check suppress header row

>> Wrap cell text= 20 lines

The output:

venndiagram.JPG.jpg

For more reference attached is the sample qvw file.

HTH

Sushil

Attachments
Comments
Not applicable

Hi,

Can we make this dynamic. As In, if we click on the intersection in the chart, it should display the result accordingly.

thornofcrowns
Valued Contributor II

Nice diagram. My advice would be to have very few dimensions to the diagram - 2 or 3 -  much like pie charts as otherwise you're going to have a real job mapping out the combinations.

sushil353
Honored Contributor II

Hi Yashwin,

the venn diagram here is a static image generated by the google api.. so you cant make selection over chart area..

It is a possibility of showing venn diagram in qlikview but with some limitations.

HTH

Sushil

Not applicable

Okk.. Thanks sushil for the info.

Not applicable

Hi.. wanted to know if we purchase api from google for venn ,will then the chart wok as I mentioned above.

Regards

Yashwin

Not applicable

Good work..

Himank

Not applicable

Hi, I have implemented this and it appears to be working fine. Does anyone know how I would find or be able to display the intersection counts??

sushil353
Honored Contributor II

Hi Chris,

Since you have calculated the values in variables then you can easily display the intersection values using text in chart option under presentation tab.

HTH

Sushil

NavinReddy
Contributor II

Hi Sushil,

I implimented same way but im not getting  theree circles

please any helpimg.png

Best Regards

Niranjan

sushil353
Honored Contributor II

Hi Niranjan,

Could you share your sample application..

~Sushil

Version history
Revision #:
1 of 1
Last update:
‎10-30-2013 02:30 AM
Updated by: