|
關(guān)鍵字: jfreechart 柱圖 顯示數(shù)值
**QQ:252574345 **MSN:lele_love_lomboz@hotmail.com */ CategoryPlot categoryplot = (CategoryPlot)chart.getPlot();
StackedBarRenderer3D stackedbarrenderer = (StackedBarRenderer3D)categoryplot.getRenderer();
stackedbarrenderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator() );
當(dāng)然,和前面的介紹一樣,也可以對(duì)顯示的數(shù)值進(jìn)行格式化,例如
//new StandardCategoryItemLabelGenerator("{2}",new DecimalFormat("0.0%"))
可以在柱子上顯示名稱,數(shù)值,比例等信息 |
|
|
來(lái)自: WindySky > 《JFREECHART》