最近在用JFreeChart画分析图(Java Application程序),我的横坐标轴是日期类型的数值
,如果横着显示成YYYY-MM-DD有些太占空间了,谁知道如何才能让他竖着显示呢? 例如:   
  3|   
  2|   
  1|   
  0|——————|——————|——————————〉   
     2      2         2  
    0      0          0
    0      0          0
    6      7          8
    

解决方案 »

  1.   

    如果用的是CategoryPlot,如下面,其他的都有相应的Plot和Axis来设置    CategoryPlot plot = (CategoryPlot) chart.getPlot(); 
        CategoryAxis categoryAxis = plot.getDomainAxis(); 
        // 横轴上的 Lable 90度倾斜 
        categoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_90);
      

  2.   

    DateAxis dateaxis = (DateAxis) xyplot.getDomainAxis(); // X轴
    dateaxis.setVerticalTickLabels(true);