小编Aru*_*Aru的帖子

如何在JasperReports中以HH:mm:ss格式显示日期?

我正在使用以下代码在JasperReports中生成图表.

<xyLineChart> 
    <chart evaluationTime="Band"> 
        <reportElement x="0" y="0" width="555" height="500"/> 
    </chart> 
    <xyDataset> 
        <dataset incrementType="None"/> 
        <xySeries> 
            <seriesExpression><![CDATA["CpuUsageGraph"]]></seriesExpression> 
            <xValueExpression><![CDATA[new Long($F{time}.getTime())]]></xValueExpression> 
            <yValueExpression><![CDATA[$F{cpuUsage}]]></yValueExpression>
        </xySeries> 
    </xyDataset> 
    <linePlot> 
        <plot/> 
    </linePlot> 
</xyLineChart>
Run Code Online (Sandbox Code Playgroud)

我在X轴上打印日期,但它以毫秒为单位显示.如何以hh:mm:ss格式显示?

jasper-reports

9
推荐指数
1
解决办法
3万
查看次数

标签 统计

jasper-reports ×1