我用的struts2 jfreeChart 插件版本是1.0.13
现在显示的饼图没有数值
网上找了不少代码 但是这个版本都不识别那些类了
13版本该怎么设置数值?

解决方案 »

  1.   

    解决了,
    PiePlot plot = (PiePlot)chart.getPlot();
       //设置饼图各部分的标签字体
       plot.setLabelFont(new Font("隶书", Font.BOLD, 18)); 
       //设定背景透明度(0-1.0之间)
       plot.setBackgroundAlpha(0.9f);
       //设定前景透明度(0-1.0之间)
       plot.setForegroundAlpha(0.50f);
       PieSectionLabelGenerator generator = 
       new StandardPieSectionLabelGenerator(
       ("{0}: ({1},{2})"), 
       new DecimalFormat("0"),
       new DecimalFormat("0.00%"));
       plot.setLabelGenerator(generator);