I have several rectangles and I am trying to create a wordcloud "inside" each rectangle. To achieve this I am obtaining the bounding box of each rectangle. From the bounding box, I am getting the height and width of the rectangle and passing it to the layout size() function. However it looks like the layout isn't obeying the size being passed. Can anyone please tell me what I'm doing wrong?
Information about the DOM elements in my code:
Each rectangle resides inside a g element. I have assigned the class 'wordG' to all of these g elements.
The aim is to have a wordcloud layout inside each of these g elements.
Below is my code snippet which isn't working as expected:
I have several rectangles and I am trying to create a wordcloud "inside" each rectangle. To achieve this I am obtaining the bounding box of each rectangle. From the bounding box, I am getting the height and width of the rectangle and passing it to the layout size() function. However it looks like the layout isn't obeying the size being passed. Can anyone please tell me what I'm doing wrong?
Information about the DOM elements in my code:
Below is my code snippet which isn't working as expected: