You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently I am plotting word cloud chart by assigning maximum font size to most occurring word and minimum font size to least occurring word and calculating font size of of all intermediate words using formula:
fontSize = (currentCount / maxCount) * (maxFont - minFont) + minFont;
where currentCount is number of occurrence of a particular word and
maxCount is number of occurrence of maximum occurring word.
Currently the min and max font sizes are hard coded.
When dimensions of container are dynamically changed or resized, i am unable to plot most occurring words with maxFont size that is set initially. Because the min and max font size may not be the best fit for all container dimensions. So we need a calculation or formula where we can calculate min and max font sizes for each different dimensions instead of manually setting them.
Questions & Problems to fix:
How to set font sizes differently for each plot area based on width and height?
If not set different font sizes the most occurring words are missing from the chart and is not consistent across various plot area dimensions.
Is there any other approach to make most occurring word with max font size visible for all dimensions other than using overflow(true) ?
Currently I am plotting word cloud chart by assigning maximum font size to most occurring word and minimum font size to least occurring word and calculating font size of of all intermediate words using formula:
fontSize = (currentCount / maxCount) * (maxFont - minFont) + minFont;
where currentCount is number of occurrence of a particular word and
maxCount is number of occurrence of maximum occurring word.
Currently the min and max font sizes are hard coded.
When dimensions of container are dynamically changed or resized, i am unable to plot most occurring words with maxFont size that is set initially. Because the min and max font size may not be the best fit for all container dimensions. So we need a calculation or formula where we can calculate min and max font sizes for each different dimensions instead of manually setting them.
Questions & Problems to fix:
Sample Fiddle: https://jsfiddle.net/h7u5k1ab/4/
The text was updated successfully, but these errors were encountered: