code: private void drawYLabel(Graphics2D chartGraphics) {
      if (yAxisLabel != null) {
        // Strings are drawn from the baseline position of the leftmost char.
        int yPosYAxisLabel = heatMapC.y + (yAxisLabelSize.width / 2);
        int xPosYAxisLabel = (margin / 2) + yAxisLabelAscent;
  
        chartGraphics.setFont(axisLabelsFont);
        chartGraphics.setColor(axisLabelColour);
  
        // Create 270 degree rotated transform.
        AffineTransform transform = chartGraphics.getTransform();
        AffineTransform originalTransform = (AffineTransform) transform.clone();
        transform.rotate(Math.toRadians(270), xPosYAxisLabel, yPosYAxisLabel);
        chartGraphics.setTransform(transform);
  
        // Draw string.
        chartGraphics.drawString(yAxisLabel, xPosYAxisLabel, yPosYAxisLabel);
  
        // Revert to original transform before rotation.
        chartGraphics.setTransform(originalTransform);
      }
    }
docs: /*
  Draws the y-axis label string if it is not null.