RFR: 8427: Text getting overlapped on graph of Processes screen

Marcus Hirt hirt at openjdk.org
Wed Oct 22 15:25:48 UTC 2025


On Fri, 10 Oct 2025 16:09:39 GMT, Aymane Harmaz <aharmaz at openjdk.org> wrote:

> When the width of the chart title label exceeds the left margin ( xOffset) reserved for it, the label is truncated without taking into account the width of the y-axis tick labels. This can potentially lead to overlapping between the chart title and the y-axis tick labels.
> 
> Currently, the width of the y-axis tick labels is determined at the formatter level and is not dynamically available during chart label truncation.
> 
> Two potential workarounds are :
> 
> - Increase the xOffset size for the affected chart, allocating enough space to display both the chart title and the tick labels without overlap.
> (This impacts only the chart in question.)
> - Base Chart title label truncation on a default value for y-axis tick labels, even without access to exact tick widths.
> (This impacts all charts.)
> 
> I followed the first strategy.
> 
> Screenshot of processes page post change : 
> 
> <img width="1173" height="343" alt="Screenshot 2025-10-10 at 17 02 40" src="https://github.com/user-attachments/assets/c490525f-b816-4bce-b242-621439ccf22e" />

Marked as reviewed by hirt (Lead).

I'll approve. It would be nice in the future to be able to avoid magic numbers, but this at least leaves us in a better place.

-------------

PR Review: https://git.openjdk.org/jmc/pull/678#pullrequestreview-3366338259
PR Comment: https://git.openjdk.org/jmc/pull/678#issuecomment-3432989111


More information about the jmc-dev mailing list