Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.

public final class Squarify

  1. Object
  2. 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.

Methods

public static float[][] layout(double[] values, float x, float y, float w, float h)Lays out values in a rectangle.

Inherited methods

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 double[]
the values, not necessarily sorted; negative and non-finite values count as 0
x float
the rectangle’s left
y float
the rectangle’s top
w float
the rectangle’s width
h float
the rectangle’s height

Returns

one {x, y, w, h} per value, in the order given