Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diagnoal category labels using cewolf ?

chinmay
2004-12-08
2013-01-13
  • chinmay
    chinmay
    2004-12-08

    I have figured out a way to put my category labels vertically using the following code in my chartpostprocessor :

    HorizontalCategoryAxis axis = (HorizontalCategoryAxis)plot.getDomainAxis();
    axis.setVerticalCategoryLabels(true);

    Is there any way by which I can align it at any angle ?

    Regards,
    Chinmay Jain

     
    • Brian Fox
      Brian Fox
      2005-01-07

      check www.jfree.org for how to do that. It is possible but I can't remember how.

       
    • walfreund
      walfreund
      2005-04-21

      I guess it's this:

      CategoryAxis axis = plot.getDomainAxis();
      axis.setCategoryLabelPositions(
      CategoryLabelPositions.createUpRotationLabelPositions(Math.PI/ 6.0).

      Play around with der divider of PI if you want another angle.

      greets,
      walfreund

       
    • worker1983
      worker1983
      2005-08-09

      walfreund, how i can use your code in my JSP page?

      My site throws an error:
      cannot resolve symbol symbol : class CategoryAxis location: class
      cannot resolve symbol symbol : variable plot location: class

      I've used following implementation:
      CategoryAxis axis = plot.getDomainAxis();
      axis.setCategoryLabelPositions( CategoryLabelPositions.createUpRotationLabelPositions(Math.PI/ 6.0) );

       
    • Rebeca
      Rebeca
      2007-02-08

      Where did you get the HorizontalCategoryAxis class??