Image 如何使用jfreechart在pichart中将字体设置为字幕?
我已经生成了有字幕的图表 i、 e.现金、总额、保证金 现在的问题是,字幕看起来比实际图表要大Image 如何使用jfreechart在pichart中将字体设置为字幕?,image,jfreechart,font-size,subtitle,Image,Jfreechart,Font Size,Subtitle,我已经生成了有字幕的图表 i、 e.现金、总额、保证金 现在的问题是,字幕看起来比实际图表要大 如何为这些字幕设置字体?用于标签 StandardPieSectionLabelGenerator slbl = new StandardPieSectionLabelGenerator("{0} [{1}]",new DecimalFormat("#,##0"),new DecimalFormat("0%")); piePlot.setLabelGenerator(slbl); 用于字体 new
如何为这些字幕设置字体?用于标签
StandardPieSectionLabelGenerator slbl = new StandardPieSectionLabelGenerator("{0} [{1}]",new DecimalFormat("#,##0"),new DecimalFormat("0%"));
piePlot.setLabelGenerator(slbl);
用于字体
new Font("SansSerif", Font.ITALIC, 7)
我建议您尝试将该字体添加到
StandardPieSectionLabelGenerator
Wekcome to Stack overflow中。谢谢你的回答。我对其进行了一些编辑,以将代码转换为标准格式。您可以通过在代码块前面留下一个空行并缩进4个空格来格式化代码块。对于内联代码,请在其周围加上反勾号。