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
Hi,
how can I set the horizontal or vertical layout for the treemap independent of the width/height ration?
I would like to create a wide treemap with the fields appearing underneath thus the labels are better readable.
Screenshot 1 (wider than higher) should be like Screenshot 2 (higher than wider).
The text was updated successfully, but these errors were encountered:
You can’t really do this using squarify.ratio because that ratio is independent of the orientation and is always greater than or equal to one.
If you are willing to give up inner padding, you can approximate this result by instead using a squarify.ratio of one, and then stretching the resulting treemap to fit the desired target ratio. Here’s an example:
Yeah that should work. Thanks for that.
In that case w and h should be greater 0 otherwise -1px will break the layout. var w = Math.round(d.x1 * ratio) - Math.round(d.x0 * ratio); return (w > 0 ? w - 1 : 0) + "px";
Hi,
how can I set the horizontal or vertical layout for the treemap independent of the width/height ration?
I would like to create a wide treemap with the fields appearing underneath thus the labels are better readable.
Screenshot 1 (wider than higher) should be like Screenshot 2 (higher than wider).
The text was updated successfully, but these errors were encountered: