pub struct Tiling { /* private fields */ }
Implementations§
Source§impl Tiling
impl Tiling
Sourcepub fn packing(&mut self, packing: Packing) -> &mut Self
pub fn packing(&mut self, packing: Packing) -> &mut Self
Determines d3 treemap solver. For more info please refer to https://github.com/d3/d3-hierarchy#treemap-tiling
default: squarify
Sourcepub fn squarifyratio(&mut self, squarifyratio: f64) -> &mut Self
pub fn squarifyratio(&mut self, squarifyratio: f64) -> &mut Self
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.
default: 1