code: private void addYLabel(YAxis yAxis, String text, int n) {
          YLabel label = new YLabel(text, n);
          label.setRotation(getRotation(chart.getXorientation()));
          label.setColour(getHexColor(chart.getXColor()));
          label.setSize(chart.getYLabelFont().getSize());
          yAxis.addLabels(label);
      }
docs: for horizontal chart