JFreeChart Evaluation

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Nathani
Posts: 5
Joined: Tue Apr 25, 2006 11:15 pm

JFreeChart Evaluation

Post by Nathani » Tue Apr 25, 2006 11:19 pm

I am currently evaluating JFreeChart for my company. I don't have time to test JFreeChart, so I'm hoping someone can just provide my with an answer.

Our product will include up to 20 real time xy graphs running on different tabs. With data rates in about 10-20 data points per second. Is JFreeChart light enough to do this? Also our platform is NetBeans (in case that's an issue).

Thanks to everyone,

Nathan

Carl Manaster
Posts: 35
Joined: Tue Mar 28, 2006 1:10 am
Location: La Jolla
Contact:

Post by Carl Manaster » Wed Apr 26, 2006 12:34 am

Hi, Nathan,

Do the individual charts have only 10-20 points on them (each), or are they growing by that amount every second? If it's a steady 10-20 points per chart, my (only lightly informed) guess is that jfreechart will have no problem with them, but if it's thousands of points (plus 10-20 new ones), it could become a problem. I believe you need to redraw the entire chart with every update; doing that for 20 small charts once a second shouldn't be too demanding, but for 20 large charts it could be.

Peace,
--Carl

gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

Post by gumshoe » Wed Apr 26, 2006 3:39 pm

There is a number of things you can do, see http://www.jfree.org/phpBB2/viewtopic.p ... highlight=.

Some considerations:

If each chart is on its own tab then redraw actions need only occur on the currently viewed tab. This would be a huge savings as the other charts would only be having data added to their datasets which is relatively cheap compared to a redraw. Even if all of the charts are to be visible simultaneously I would put my money on it being feasable with to following caveats:
  • Each chart contains <5K points and you use the speed modifications linked above.
    You add values to the datasets at whatever rate you desire but limit the redraws to at most once per second.
    If you have trend cursors on the charts you use something akin to http://www.jfree.org/phpBB2/viewtopic.p ... highlight=.
Let me know if this helped.

Nathani
Posts: 5
Joined: Tue Apr 25, 2006 11:15 pm

Post by Nathani » Wed Apr 26, 2006 4:24 pm

Yes each plot receives around 10-20 new data points per second. However only a maximum of about 8 plots will be contained in a single tab, so I would guess that redraws only need to be done on a maximum of 8 plots. Each plot will contain between 100-300 points. So at worst there should be 2400 points being redrawn on 8 different charts (300 each) every 50ms.

Before now we've been using VB6 and an activeX control http://www.globalshareware.com/Software ... ontrol.htm

I really have no idea. We didn't have any problems there. I've heard Java can be slow, but it shouldn't be slower than VB should it? I guess my concern is that this application we use to monitor sensors in our roadtests will bogg down our 2 year old laptops. Maybe I'm out to lunch on that, I don't know.

My company is actually trying to decide between moving to C# or Java. This is one of our concerns that i've been asked to look into.

Obviously JFreeChart is far beyond the caliber of product we need for our applications, so if anyone wants to suggest a simpler product than JFreeChart, I am open to that as well. We will basically only be using the dynamic time series demonstrated in the dynamic data demo 2.

Thanks again,

Nathan
Last edited by Nathani on Wed Apr 26, 2006 4:38 pm, edited 1 time in total.

gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

Post by gumshoe » Wed Apr 26, 2006 4:36 pm

Apart from startup times (loading the JVM) Java is faster than VB. This is a simplistic statement that makes all sorts of assumptions about how stuff is coded in each language but should serve for the purposes of our discussion.

How many data points will each chart retain? This probably the most important performance consideration for you.

As for an alternative to JFreeChart; I would say use it. I spent a fair bit of time looking around and settled on it even though I only use timeseries charts at the moment.

Nathani
Posts: 5
Joined: Tue Apr 25, 2006 11:15 pm

Post by Nathani » Wed Apr 26, 2006 4:42 pm

Sorry I edited my post above. Added some data. I agree, I think that with all things considered Java should actually give us a performance boost. I am just a little unsure about how efficient JFreeChart's dynamic data is. I assume that it is quite efficient as it seems to be a solution selected by alot of devellopers.

gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

Post by gumshoe » Wed Apr 26, 2006 4:48 pm

Based on those numbers I don't see a problem. Even so, I would suggest making a quick mockup that just feeds random data to 8 charts at the rates you expect.

Nathani
Posts: 5
Joined: Tue Apr 25, 2006 11:15 pm

Post by Nathani » Wed Apr 26, 2006 4:53 pm

I would love to. Unfortunately I'm just starting to learn NetBeans, and I can't figure out how to do this. I would be more than willing to purchase the manual after I do my mock up. Is there another resource/tutorial around?

Thanks again for your response,

doudou
Posts: 27
Joined: Tue Mar 14, 2006 6:05 pm

Post by doudou » Wed Apr 26, 2006 4:54 pm

Nathani wrote:Sorry I edited my post above. Added some data. I agree, I think that with all things considered Java should actually give us a performance boost. I am just a little unsure about how efficient JFreeChart's dynamic data is. I assume that it is quite efficient as it seems to be a solution selected by alot of devellopers.
Currently using it for real time data graphic (but the refresh is not as short as your needs) I am just happy with it.

Nathani
Posts: 5
Joined: Tue Apr 25, 2006 11:15 pm

Post by Nathani » Wed Apr 26, 2006 5:49 pm

Ok, I think I've got the answers I need. All except how to use JFreeChart in netbeans, but that's something me and netbeans will have to sort out I guess. Thanks to everyone for their answers.

gumshoe
Posts: 80
Joined: Mon Jul 12, 2004 6:06 pm

Post by gumshoe » Wed Apr 26, 2006 8:41 pm

I have not bothered to make ChartPanel a custom NetBeans bean; it is easy enough to make the GUI and then manually assign the ChartPanel where you want it.

Locked