Jasper Report 中未应用 Itemlabel 字体大小
我正在使用 IReports 版本 3.7.5 创建报告(目前我们使用此版本)。在我的报告中,我包含了一个条形图。我想在“酒吧”内显示标签。
目前,这是这样完成的:
但现在我想修改字体颜色和大小,但这不适用于我的图表,我找不到这方面的错误报告?!我做错了什么吗?
我的 JRXML 部分是:
<barPlot isShowLabels="true" isShowTickLabels="true" isShowTickMarks="true">
<plot>
<seriesColor seriesOrder="0" color="#8FCB52"/>
<seriesColor seriesOrder="1" color="#276FDD"/>
</plot>
<itemLabel color="#FF6600" backgroundColor="#33FF00">
<font size="5"/>
</itemLabel>
<categoryAxisLabelExpression><![CDATA[$R{period}]]></categoryAxisLabelExpression>
<categoryAxisFormat>
<axisFormat labelColor="#000000" axisLineColor="#000000">
<labelFont>
<font size="8"/>
</labelFont>
<tickLabelFont/>
</axisFormat>
</categoryAxisFormat>
<valueAxisLabelExpression><![CDATA[$R{amount}]]></valueAxisLabelExpression>
<valueAxisFormat>
<axisFormat labelColor="#000000" tickLabelColor="#000000" verticalTickLabels="false">
<labelFont>
<font size="8"/>
</labelFont>
<tickLabelFont/>
</axisFormat>
</valueAxisFormat>
谢谢你帮我。
I am creating a report with IReports version 3.7.5 (currently we use this version). In my report I have included a bar chart. I would like to show the label inside 'a bar'.
Currently this is done like this:
But now I want to modify the font-color and size, however this is not applied to my chart, and I could not find a bugreport for this?! Am I doing something wrong?
My JRXML part for this is:
<barPlot isShowLabels="true" isShowTickLabels="true" isShowTickMarks="true">
<plot>
<seriesColor seriesOrder="0" color="#8FCB52"/>
<seriesColor seriesOrder="1" color="#276FDD"/>
</plot>
<itemLabel color="#FF6600" backgroundColor="#33FF00">
<font size="5"/>
</itemLabel>
<categoryAxisLabelExpression><![CDATA[$R{period}]]></categoryAxisLabelExpression>
<categoryAxisFormat>
<axisFormat labelColor="#000000" axisLineColor="#000000">
<labelFont>
<font size="8"/>
</labelFont>
<tickLabelFont/>
</axisFormat>
</categoryAxisFormat>
<valueAxisLabelExpression><![CDATA[$R{amount}]]></valueAxisLabelExpression>
<valueAxisFormat>
<axisFormat labelColor="#000000" tickLabelColor="#000000" verticalTickLabels="false">
<labelFont>
<font size="8"/>
</labelFont>
<tickLabelFont/>
</axisFormat>
</valueAxisFormat>
Thanks for helping me out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
图表引擎 JFreeChart 可以做到这一点。但 iReport 和 JasperReports 不公开这些字体属性。您需要图表主题或图表定制器。
您可以在 jasperforge.org 网站上找到更多详细信息。我写了一个图表定制器教程,它可以提供帮助。
The chart engine, JFreeChart, can do this. But iReport and JasperReports don't expose these font properties. You need a chart theme or a chart customizer.
You'll find more details on the jasperforge.org site. I wrote a chart customizer tutorial which could help.