Jasper reports 我想在jaspersoft的xyline图中使用Date作为我的x值,但它只允许一个数字

Jasper reports 我想在jaspersoft的xyline图中使用Date作为我的x值,但它只允许一个数字,jasper-reports,jaspersoft-studio,Jasper Reports,Jaspersoft Studio,在jaspersoft XYLine graph中,有没有一种方法可以呈现日期值而不是数字?是否有办法操纵x标签,使其显示为MM/DD?这是我现在的代码,我得到月和日的值,并将它们连接为字符串,然后将它们转换为整数922、923、924、925。我也附上预览 <xyDataset> <xySeries autoSort="true"> <seriesExpression><![CDATA["SERIES 1"]]></series

在jaspersoft XYLine graph中,有没有一种方法可以呈现日期值而不是数字?是否有办法操纵x标签,使其显示为MM/DD?这是我现在的代码,我得到月和日的值,并将它们连接为字符串,然后将它们转换为整数922、923、924、925。我也附上预览

<xyDataset>
  <xySeries autoSort="true">
    <seriesExpression><![CDATA["SERIES 1"]]></seriesExpression>
    <xValueExpression><![CDATA[Integer.parseInt(String.valueOf($F{date}.getMonth()) +      String.valueOf($F{date}.getDate()))]]></xValueExpression>
    <yValueExpression><![CDATA[$F{temp}]]></yValueExpression>
  </xySeries>
</xyDataset>

试试这个:在xValueExpression中新建SimpleDataFormatMM dd.format$F{date}。这也不行。。。结果值是字符串…无论如何,谢谢…您可以尝试使用时间序列图进行此操作。谢谢您的建议…非常有效。。。