D3 treemap: reserve min width and height for the smallest node

Viewed 2231

I am new to D3 world and I built my first treemap.

I can't find solution to reserve the smallest node's dimension (certain width and height).

Basically, if you look at my JSfiddle, you will see that the smallest node having the size of 1 can't properly display its label inside because the box/node is to small so the text can't fit.

{"name": "label5", "size": 1}

Can someone please help how I can reserve/specify the smallest node's size (width and height) so the certain text/label could fit?

Here's my full JSFiddle:

enter image description here

1 Answers
Related