Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
181 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...