Review request for JMC-6207: Graphs Y-axis title not shown when changed in windows 10.

Deepa Avhad deepa.avhad at
Fri Nov 16 10:06:05 UTC 2018

Hi All,

Kindly please ignore the previous Bug Id mentioned in the previous mail as it was sent by mistake.
Please review the small fix, the correct Bug Id :



--- old/application/org.openjdk.jmc.greychart/src/main/java/org/openjdk/jmc/greychart/impl/	2018-11-16 11:09:15.656210600 +0530
+++ new/application/org.openjdk.jmc.greychart/src/main/java/org/openjdk/jmc/greychart/impl/	2018-11-16 11:09:14.623778000 +0530
@@ -167,13 +167,13 @@
 	private void paintTitle(Graphics2D ctx, AffineTransform labelTrans, AffineTransform titleTrans) {
+		Rectangle titleBounds = ctx.getFontMetrics().getStringBounds(getTitle(), ctx).getBounds();
 		// calculate size for "legend" boxes in title
 		int boxSize = Math.max(2, ctx.getFontMetrics().getHeight() / 2);
 		// calculate padding, title bounds and text width
 		int padding = Math.max(1, Math.round(boxSize * .5f));
-		Rectangle titleBounds = ctx.getFontMetrics().getStringBounds(getTitle(), ctx).getBounds();
 		int textWidth = titleBounds.width;
 		// add space for "legend" boxes in title, if necessary
 		OptimizingProvider[] providers = new OptimizingProvider[0];


----- Original Message -----
From: deepa.avhad at
To: jmc-dev at
Sent: Friday, November 16, 2018 12:38:36 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
Subject: Review request for JMC-6094: [CS-005] Graphs Y-axis title not shown when changed in windows 10.

Hi All,

Please review the small fix for, 

Jira    :
RC      : 'StringBounds()' of y-axis-title  are getting changed in jdk-11 after applying rotation transformation. 
          Thus,Y-axis title not shown when changed in windows 10. Above same is not changed using jdk-8. 
Solution: Storing 'StringBounds()' of y-axis-title before applying rotation transformation.
Test    : Tested on Windows 10, MacOS  and yet to test on Linux.


More information about the jmc-dev mailing list