Class Squarify
java.lang.Object
com.codename1.ui.chart.layout.Squarify
The squarified treemap layout of Bruls, Huizing and van Wijk: rectangles with areas
proportional to values and aspect ratios as close to square as the greedy row filling
allows, which keeps small cells readable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic float[][]layout(double[] values, float x, float y, float w, float h) Lays out values in a rectangle.
-
Method Details
-
layout
public static float[][] layout(double[] values, float x, float y, float w, float h) Lays out values in a rectangle.
Parameters
-
values: the values, not necessarily sorted; negative and non-finite values count as 0 -
x: the rectangle's left -
y: the rectangle's top -
w: the rectangle's width -
h: the rectangle's height
Returns
one
{x, y, w, h}per value, in the order given -
-