Jasperreports时间序列图 [英] Jasperreports time series chart

查看:123
本文介绍了Jasperreports时间序列图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个csv文件作为数据源。我想创建一个时间序列图表来显示一天中的数据。来自csv文件的时间序列数据类似于 0:15 0:30 0:45 ... 23:45 ,并且每次pot都有一个我想要显示的值在图表中。

I have a csv file as the data source. I want to create a time series chart to show the data during a day. The time series data from csv file is like 0:15 0:30 0:45 ... 23:45, and every time pot has a value which I want to show in the chart.

所以我只使用: new SimpleDateFormat(HH:mm)。parse($ F {time})是时间周期表达式,但图表看起来只有一个点,只有 23:59:59.999 00: 00:00.000 在x轴上

So I just use: new SimpleDateFormat("HH:mm").parse($F{time}) to be the Time period expression, but the chart looks like just one dot, and just 23:59:59.999 and 00:00:00.000 on the x-axis

如何修复它以显示 0:15 0:30 0 :x轴上的45 ... 23:45 和y轴上的相应值?如何设置时间段表达式以及任何其他设置?

How do I fix it to show 0:15 0:30 0:45 ... 23:45 on x-axis and corresponding value on y-axis? How do I set the time period expression, and any other setup?

推荐答案

如果要显示CSV文件中的每个条目在X轴上,不要使用时间序列图表,而是使用线图表。
您也不必解析日期 - 只需将字段分配给类别表达式即可完成。

If you want to show each entry in your CSV file on the X-axis, don't use the time series charts, but the "Line" chart. You don't have to parse the date either - simply assign the field to the "Category expression" and you should be done.

这篇关于Jasperreports时间序列图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆