Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 如何使用jfreechart在pichart中将字体设置为字幕?_Image_Jfreechart_Font Size_Subtitle - Fatal编程技术网

Image 如何使用jfreechart在pichart中将字体设置为字幕?

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

我已经生成了有字幕的图表 i、 e.现金、总额、保证金 现在的问题是,字幕看起来比实际图表要大


如何为这些字幕设置字体?

用于标签

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个空格来格式化代码块。对于内联代码,请在其周围加上反勾号。