Skip to main content

compute_skip_factor

Function compute_skip_factor 

Source
pub fn compute_skip_factor(
    labels: &[String],
    available_width: f64,
    rotation_angle_deg: f64,
) -> Option<usize>
Expand description

After rotation, check if labels still overlap and compute skip factor. Since post-rotation truncation is applied in generate_x_axis, the skip factor only needs to engage when there are so many labels that even a minimal truncated label (~40px wide) would overlap after rotation.