Skip to content

BUG: 15618 Fix auto-format label values

Auto-formatted labels where often artificially short.

The target height for a label value was based on the space between label tick marks. This spacing is often larger than the space required for the desired font size. Using this target height would make the vtkTextActor that figures out whether a particular label fits in its allotted space scale up the font size, making longer labels not fit in the allotted space. Hence, labels would be unnecessarily short.

As a fix, reduce the target height to the minimum of the currently computed target height and the height of a '|' character as reported by a helper vtkTextActor. This should produce better label.

Merge request reports