Jasper Report 中未应用 Itemlabel 字体大小

发布于 2024-12-25 05:07:38 字数 1364 浏览 4 评论 0原文

我正在使用 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:
enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你的笑 2025-01-01 05:07:38

图表引擎 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文