Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
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
Not applicable

wordcloud error.PNG

I am getting this error when running the example qvw

Not applicable

When I put something in the color calc it disappears and has no effect. Any ideas?

Brian_Munz
Employee
Employee
Author

You’re probably running QlikView 11 SR ?

Not applicable

Yep, so I will have to update to make the color work?

Brian_Munz
Employee
Employee
Author

Unfortunately the setting of properties in any extension does not work in v11 SR1. So basically unless the extension properties were set up in an older version before upgrading to SR1, extensions won’t work.

ordre
Partner Ambassador
Partner Ambassador

Hi All,

First of all thank you for your great job. Your extension works fine ie9/firefox/Safari, QV 11.2 IR and SR1. But we have problems with ie 8 version with same qlikview installation. From ie8 browser we are getting this error message as below. Any idea for workaround solution, if not is it possible editing script?

Thanks

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)

Timestamp: Thu, 23 May 2013 13:06:54 UTC

Message: Object doesn't support this property or method

Line: 2

Char: 13035

Code: 0

URI: http://qlikview/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/wordCloud/d3.js&xrfkey=naq9...

Message: Object doesn't support this property or method

Line: 367

Char: 5

Code: 0

URI: http://qlikview/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/wordCloud/d3.layout.cloud.j...

Message: Object doesn't support this property or method

Line: 2

Char: 13035

Code: 0

URI: http://qlikview/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/wordCloud/d3.js&xrfkey=q9Dh...

Message: Object doesn't support this property or method

Line: 367

Char: 5

Code: 0

URI: http://qlikview/QvAjaxZfc/QvsViewClient.aspx?public=only&name=Extensions/wordCloud/d3.layout.cloud.j...

Not applicable

Hi Brian

Is it possible to change the Font in word cloud.

samuel_lin
Creator
Creator

Dear Brian,

I am new to Qlikview, I am very impressed with your word cloud extension, could you please post an example of the color expression to create the word cloud similar to your example?

Thank you so much for your help!

Not applicable

Hi Brian,

I got error as in attachment.

I have Qlikview 11.00 IR

And IE version 8.0

Is there any specific prerequisite for this extension graph.....?

mountaindude
Partner Ambassador
Partner Ambassador

You might want to try a more recent IE version... I've had loads of trouble when using/developing extensions with old IE versions. Most of them went away when I went to the latest available IE.

Please mark the post as a solution if it provided you with a solution to the topic at hand. Thanks!