Skip to main content

Module labels

Module labels 

Source

Structs§

LabelStrategyConfig
Configuration for label strategy determination.

Enums§

LabelStrategy
The strategy selected for rendering labels.

Functions§

approximate_text_width
Approximate text width in pixels using a character-width table.
compute_skip_factor
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.
strategic_indices
Select strategic indices for sampled label display. Always includes first and last; evenly distributes the rest.
truncate_label
Truncate a label to fit within max_width, adding ellipsis.