File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Timeseries Charts  data every 5 Seconds? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Timeseries Charts  data every 5 Seconds?" Watch "Timeseries Charts  data every 5 Seconds?" New topic
Author

Timeseries Charts data every 5 Seconds?

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi ,

We have Time Series data for every 5 Seconds .
Now you can assume what will be the Data for a single day ??

We have a requirement of showing a graph/ chart for a Whole Month .

(For example a user selects a Month from Jan 1st 2011 to Jan 31st 2011 )

The data loaded might be too heavy and it may degrade the applications performance or make it Out of Memory .

How can we handle this requirement ??

The Flotr API uses this method to draw the Charts , which requires the data to be already loaded .




Please suggest , Thank you very much .


Save India From Corruption - Anna Hazare.
Christopher Nortje
Greenhorn

Joined: Jul 09, 2010
Posts: 16
Aggregate the data, instead of reporting every 5 second report ever X amount of minutes. Unless the graph is HUGE the users won't be able to notice that the data has been aggregated. If the need to drill down onto seconds just re render the chart with that data set (filter data for example that day).
James Sabre
Ranch Hand

Joined: Sep 07, 2004
Posts: 781

A data point every 5 seconds for a month is about half a million points. Assuming that your axis length is about 1000 pixels then, if plotted directly, each pixel will need to display about 500 points. Rather cluttered at best and not very informative to users.

A few years ago when I was dealing with data in these quantities we (that is the team I was working with) actually plotted 3 lines on each chart. We broke the time period into about 500 fixed width periods and then for each period we calculated the average, the minimum and the maximum value and plotted these as three lines on one chart using 3 different colours using the mid value of each period for the X value. Very very effective and very very fast since computing the average, min and max is very quick.



Retired horse trader.
 Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Timeseries Charts data every 5 Seconds?