Skip to main content
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
hps
Employee
Employee

Works fine when deploying on a server and adding from the access point

But running the same in qv.exe/webview on the same server generates issues.

Security permissions in IE interfering?

Espescially so for running Javascripts?

Brian_Munz
Employee
Employee
Author

Have you ever installed any other extensions before?

hps
Employee
Employee

Yes of course.

The Google Maps extension works fine in qv.exe webview for example.

Brian_Munz
Employee
Employee
Author

Could you please post the error that pops up for you?

Thanks.

Brian_Munz
Employee
Employee
Author

SR1 has a bug with extension properties, so maybe that's related?

See here for a workaround in SR1: http://community.qlik.com/message/246202#246202

hps
Employee
Employee

Get this with QV.exe

WordCloudError.png

Brian_Munz
Employee
Employee
Author

Very strange that it's an error with the QvAjax.js....

hps
Employee
Employee

I actually get the same error when trying to use it in 10 SR3 through QV.exe and webview

Brian_Munz
Employee
Employee
Author

I'm wondering...are you using words with a lot of "foreign" characters?  I only tested this extension with English words.

Not applicable

I have to say I'm using QV 11 SR2 (11414) and Internet Explorer 9 (9.0.8112) and worked perfectly since first time I tested it.

ScreenShot439.png

Thanks Brian for the great work, it will be very useful (actually, I showed it to a customer that was waiting for something like this).