Anonymous - 2013-02-04

Hi. I wanted to display dates on the x-axis as vertical labels. I could make the labels vertical by overriding the paintXLabel method like this:

    public void paintXLabel(int x, int y, String label, Graphics g) {
        AffineTransform at = AffineTransform.getRotateInstance(Math.toRadians(90));
        Font font = g.getFont();    
        g.setFont(font.deriveFont(at));
        g.drawString(label, x, y);
        g.setFont(font);

    }

The problem now is that only the beginning of each label is visible because they go outside chart area. Is there any way to expand the chart area so that the labels are displayed properly?