Tiling

public struct Tiling : Encodable

Undocumented

  • Determines d3 treemap solver.

    For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling

    See more

    Declaration

    Swift

    public enum Packing : String, Encodable
  • Determines d3 treemap solver.

    For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling

    Declaration

    Swift

    public var packing: Packing?
  • When using squarify packing algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio this option specifies the desired aspect ratio of the generated rectangles.

    The ratio must be specified as a number greater than or equal to one. Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio; for example, a ratio of two will attempt to produce a mixture of rectangles whose width:height ratio is either 2:1 or 1:2. When using squarify, unlike d3 which uses the Golden Ratio i.e. 1.618034, Plotly applies 1 to increase squares in treemap layouts.

    Declaration

    Swift

    public var squarifyRatio: Double?
  • Determines if the positions obtained from solver are flipped on each axis.

    See more

    Declaration

    Swift

    public struct Flip : OptionSet, Encodable
  • Determines if the positions obtained from solver are flipped on each axis.

    Declaration

    Swift

    public var flip: Flip?
  • Sets the inner padding (in px).

    Declaration

    Swift

    public var padding: Double?
  • Creates Tiling object with specified properties.

    Declaration

    Swift

    public init(packing: Packing? = nil, squarifyRatio: Double? = nil, flip: Flip? = nil, padding:
            Double? = nil)

    Parameters

    packing

    Determines d3 treemap solver.

    squarifyRatio

    When using squarify packing algorithm, according to https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio this option specifies the desired aspect ratio of the generated rectangles.

    flip

    Determines if the positions obtained from solver are flipped on each axis.

    padding

    Sets the inner padding (in px).