Highcharts wordcloud: Group words in sections and show words having maximum weight in each category with relative font sizes
Refer the image in the above link. The image shows words grouped in 3 categories: Barack Obama, George Bush and Ronald Reagan. Each of these categories have a word with maximum frequency – I (70%), will (49%) and will (65%) respectively. Thus the font sizes of maximum frequency words are shown relatively.
I have tried following 3 examples:
1) Render three wordclouds in a one chart: jsfiddle.net/znm6f89r/8 - but still, word weight is based on the size within the series.
2) Define custom placement strategy: jsfiddle.net/znm6f89r/28 - but labels may not be within the column.
3) Using 3 series and setting the percentage area on X axis. http://jsfiddle.net/amrutaJgtp/znm6f89r/72/
It would be great to have a Highchart feature that supports words grouping/categorisation in wordcloud chart.
You can achieve this by overriding deriveFontSize to have the fontSize adapt to the weight of the other series data. Since each series also scales to fit the plot area better, you will have to corrigate this also.
Here's an example of how this can be achieved: http://jsfiddle.net/y3e2oxkr/2/
A feature for grouping or categorization would be very interesting to have. We would have to land on a data structure which can tell how the grouping should look like.
Another thing to keep in mind is clustering which is also a sort of grouping: http://www.macs.hw.ac.uk/texturelab/EPSRC/images/ClusterClouds/CommunicationCluster.png
Using separate X axes looks promising. Also by setting the colorByPoint option to false you get one color per series: http://jsfiddle.net/highcharts/znm6f89r/120/
I am not sure how or whether we can align the font sizes between series - my colleague will come back to you about that.