我另外想知道JFreeChart是否可以缩放大小

解决方案 »

  1.   

    只能解决第一个
    你可以用设置字体的方式来解决
    Font ft = new Font("SimSun", 10, 10);
    CategoryPlot categoryplot = null;
    TextTitle txtTitle = null;
    LegendTitle legend = null;
                            txtTitle = jfreechart.getTitle();
    legend = jfreechart.getLegend();
    categoryplot = (CategoryPlot) jfreechart.getPlot();
    txtTitle.setFont(ft);
      

  2.   

    可以设置字体来修正乱码,比如要修改标题chart.setTitle(new TextTitle("修正字体", new Font("黑体", Font.BOLD, 20)));,至于要缩放,据我所知在网页上是不支持的,要改变横轴方向的话,需要取得横轴对象后,调用该对象的setCategoryLabelPositions(CategoryLabelPositions.UP_45)方法来设定,这里是产生旋转45度角,不知道说清楚没,试试吧!
      

  3.   

    是呀。我在JSP里面也显示小方块呀。解决一下下呀。高手们
      

  4.   

    Font font = new Font("SimSun",10,20);
    TextTitle tt = chart.getTitle();
    tt.setFont(font);

    PiePlot pieplot = (PiePlot)chart.getPlot();
    pieplot.setLabelFont(font);
    chart.getLegend().setItemFont(font);
    设置字体就可以啊!