简体   繁体   English

JFree 图表时间序列刻度单位数据汇总

[英]JFree chart times series tick unit data summarization

I am using jfree chart to graphically represent data in a time line basis.我正在使用 jfree 图表在时间线基础上以图形方式表示数据。 Now there is a problem where the user can select data on a time stamp basis such as weekly, hourly, daily etc.现在存在一个问题,用户可以基于时间戳选择数据,例如每周、每小时、每天等。

Now is there a way in jfree chart which automatically does summarization for us ie if we have daily data and want to view that graph on a monthly basis?现在有没有一种方法可以在 jfree 图表中自动为我们做汇总,即如果我们有每日数据并想按月查看该图表? I want the data to be summarized on a monthly basis.我希望每月汇总数据。 I tried this using tick unit but it doesn't summarize the data accordingly but simply shows the tick unit.我尝试使用刻度单位进行此操作,但它没有相应地汇总数据,而只是显示刻度单位。

It would be of great help if there is such a feature in JFree chart.如果JFree图表中有这样的功能,那将有很大帮助。

The traditional approach is to update the model to reflect the chosen interval, but you can use the zoom methods of ChartPanel to achieve a similar effect.传统方法是更新模型以反映所选区间,但您可以使用ChartPanel的缩放方法来实现类似的效果。 In either case, the DateAxis will adjust automatically by default.无论哪种情况,默认情况下DateAxis都会自动调整。 This example may be useful for experimenting.这个例子可能对实验有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM