Page 1 of 1

word cloud rectangular spiral

Posted: Fri Nov 23, 2018 4:29 pm
by m_sunils
I need to implement a rectangular spiral in word cloud, the archimedean spiral works fine as mentioned on highcharts docs. But I am unable to figure out how a rectangular spiral can be applied (something like an elongated ellipse), tried something along the lines of whats in this sample
https://github.com/jasondavies/d3-cloud ... t.cloud.js
but was not successful.

Any help is much appreciated.

Re: word cloud rectangular spiral

Posted: Mon Nov 26, 2018 10:39 am
by bastss
Hello m_sunis,

In a word cloud, spiral property by default is set to rectangular API: https://api.highcharts.com/highcharts/p ... oud.spiral. In most of our demos word cloud is displayed as an exactly rectangular spiral, demo: https://jsfiddle.net/Bastss/t7og1q3w/. Check for a change, how word-cloud archimedean spiral looks like, demo: https://jsfiddle.net/Bastss/2swLoghp/.

Best regards!

Re: word cloud rectangular spiral

Posted: Mon Nov 26, 2018 11:26 am
by m_sunils
bastss wrote: Mon Nov 26, 2018 10:39 am Hello m_sunis,

In a word cloud, spiral property by default is set to rectangular API: https://api.highcharts.com/highcharts/p ... oud.spiral. In most of our demos word cloud is displayed as an exactly rectangular spiral, demo: https://jsfiddle.net/Bastss/t7og1q3w/. Check for a change, how word-cloud archimedean spiral looks like, demo: https://jsfiddle.net/Bastss/2swLoghp/.

Best regards!
Thanks Basts for the help, however my requirement was a rectangular spiral with the words having a 0 deg orientation as opposed to default, when I change the orientation I dont get what i want eg;
With rectangular : https://jsfiddle.net/m_sunils/2swLoghp/4/
With archimedian: https://jsfiddle.net/m_sunils/zktnpjmL/1/

But I need something like below
Image

Re: word cloud rectangular spiral

Posted: Mon Nov 26, 2018 1:56 pm
by bastss
m_sunils,

There is a link to documentation which helps you to understand word-cloud and how building algorithm works API: https://www.highcharts.com/docs/chart-a ... -algorithm. I've reached something similar by manipulating t and x values. Check demo: https://jsfiddle.net/Bastss/rtc4pz3L/

Best regards!

Re: word cloud rectangular spiral

Posted: Mon Nov 26, 2018 2:15 pm
by m_sunils
bastss wrote: Mon Nov 26, 2018 1:56 pm m_sunils,

There is a link to documentation which helps you to understand word-cloud and how building algorithm works API: https://www.highcharts.com/docs/chart-a ... -algorithm. I've reached something similar by manipulating t and x values. Check demo: https://jsfiddle.net/Bastss/rtc4pz3L/

Best regards!
Perfect!! Thanks a lot bastss!! you saved my day :)

Re: word cloud rectangular spiral

Posted: Mon Nov 26, 2018 2:33 pm
by bastss
You're welcome :)