Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_Munz
Employee
Employee

Word Cloud Object Extension

A new app for the US Presidential election is being released on the QlikView Demo Site shortly, and it contains an extension for a word cloud that might be useful.  It's built using this word cloud generation javascript library (built on the d3 JS library) which attempted to simulate the look and feel of Wordle:

cloud.png

I don't use all of the options available in this library and keep it pretty bare bones, but I imagine this extension should satisfy most use cases.

The properties are fairly straightforward:

cloudprops.png

The Words dimension is simply the list of words that will be displayed in the cloud

Measurement is an expression which controls the sizes of the words.  This could be anything you'd like to measure the words against.

Color Expression is the expression which controls the color of the words.  If you simply want one color, you could hardcode it to a hex or RGB color, or you could use an expression and mix two colors (using the ColorMix1 function from QlikView), or use the expression like a gauge and present any number of colors based on some range.

The Maximum Font Size and Minimum Font Size properties are simply the maximum and minimum sizes of the words.

SOME THINGS TO NOTE:

The cloud can be a bit unwieldly (or maybe crash) if you pass too many words into it, so I've set a maximum data set of 700 for this extension.  To change this, edit the Definition.xml file in the extension's folder and change 700 to whatever you want in this line:

<ExtensionObject Label="wordCloud" Description="wordCloud" PageHeight="700">

The only issue this might cause is if you have 1000 words in the dimension, a random selection of 700 will be passed in, in no particular order.  I've tried and tried to get the extension to sort based on the expression rather than the dimension and I think it's not possible (which may be a bug), so instead returning the top x number of words based on an expression might need to be done using set analysis, firstsortvalue, or ranking function.

I think that's it.  Let me know if you run into any problems.

EDIT

I now host this extension on GitHub. 

brianwmunz/wordCloud-QV11 · GitHub

Please download it from there form now on.  Also, feel free to update, change, improve, etc. the extension in any way you please using GitHub.

Thanks.

93 Replies
imtiaz_ullah
Creator
Creator

I have to say that the support within this community for this product is exceptional. Thank you very much.

Not applicable

this is another approach, without extensions. the qvw is here (in spanish):

Qlikview en Español: WordCloud sin extensiones

tecnica.jpg

Not applicable

Hi Brian,

The extension works very well but one thing that I cant seem to be able to fix is the text overlapping. Your original posts says that the extension is build upon the library located here:

https://www.jasondavies.com/wordcloud/#http%3A%2F%2Fsearch.twitter.com%2Fsearch.json%3Frpp%3D100%26q...

When visiting the link, the word cloud (at the link) doesn't have any overlapping. Is there any way to apply that to this extension?

Thanks.

jyothish8807
Master II
Master II

Hi Brian,

Those this word cloud extension works on QV 12  also ? I am planning to move to QV 12 SR 4 and just want to be sure about the impact, if any.

Regards

KC

Best Regards,
KC
Anil_Babu_Samineni

Brian,

It's interesting. For my local client it is working perfectly. Why this is not working @Accesspoint. Can you please help me here.

Do we require any other changes here?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

Interesting, How to remove borders?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable

Could someone could tell me how to use the mix color function in order to mix the differents colors in the word cloud¿

Many thanks

Anonymous
Not applicable

Did you solve that? i have the same problem , the overlapping.

ben_pugh
Creator
Creator

This might be a bit late, but if you're still looking for an answer then just use the field you've entered as 'measurement' (the field that contains the count of each individual word).

The colour expression would then be something like the below (with your colours set up as variables):

=colormix1( [Word Count Field] / max( TOTAL [Word Count Field] ), vColourBlue, vColourRed )

i.e. you are mixing based on the count of each word compared to the count of the most common word, to ensure all values fall on a scale of 0 to 1.

5abi0001
Creator
Creator

Hey, thanks for this extension. I saw that if i click on a name in this word cloud, it filters this selcted name. Is it possible, that if i click on a word in the word cloud it show me the notes in Qlikview, which contains this word?