Jasperreports time series chart

喜夏-厌秋 提交于 2019-12-25 03:36:27

问题


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.

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

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?


回答1:


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.



来源:https://stackoverflow.com/questions/8813866/jasperreports-time-series-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!