关键字: jfreechart 柱图 显示数值
**QQ:252574345 **MSN:lele_love_lomboz@hotmail.com */ CategoryPlot categoryplot = (CategoryPlot)chart.getPlot();
StackedBarRenderer3D stackedbarrenderer = (StackedBarRenderer3D)categoryplot.getRenderer();
stackedbarrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator() );
当然,和前面的介绍一样,也可以对显示的数值进行格式化,例如
//new StandardCategoryItemLabelGenerator("{2}",new DecimalFormat("0.0%"))
可以在柱子上显示名称,数值,比例等信息 |
|
来自: WindySky > 《JFREECHART》