Buy the Doc

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
M@cphisto

Buy the Doc

Post by M@cphisto » Sun Mar 09, 2003 12:07 pm

Hi,
i'm only intersted in real time chart for a market floor simulator, and i 'd like to know if the doc will really help me.
Could you advise me.

Thanks

M@cphisto

Re: Buy the Doc

Post by M@cphisto » Sun Mar 09, 2003 12:18 pm

An other question : if i decide to buy the doc, how long does it take to receive it?

David Gilbert

Re: Buy the Doc

Post by David Gilbert » Mon Mar 10, 2003 9:38 am

It will help some, but perhaps not enough, in respect to real time charts, bearing in mind that JFreeChart isn't specifically designed for real time charting (the event notification mechanism makes it easy to update charts frequently, but the charts are completely redrawn every time so there is a performance issue to consider).

When you order the documentation via Kagi, you receive a URL, username and password via return e-mail, so that you can download the Acrobat PDF file (just under 2mb, and about 250 pages). Most of the time, the Kagi confirmation e-mail is sent to you within a couple of minutes, but occasionally I have seen delays of a few hours (for which I apologise, it should definitely be measured in minutes not hours).

Regards,

Dave Gilbert

Guest

any other solution for the realtime charting performance?

Post by Guest » Tue May 06, 2003 12:44 am

-----JFreeChart isn't specifically designed for real time charting (the event notification mechanism makes it easy to update charts frequently, but the charts are completely redrawn every time so there is a performance issue to consider).---------

it's sad for me to know that, i just paid for the doc today, so, any other solution (in jfree) based on java applet that can get new stock ticks (serval per second) without completely redrawn, I knew the app developed in c (c++) performs well on this topic.

thanks!!

talu

any other solution for the realtime charting performance?

Post by talu » Tue May 06, 2003 12:44 am

-----JFreeChart isn't specifically designed for real time charting (the event notification mechanism makes it easy to update charts frequently, but the charts are completely redrawn every time so there is a performance issue to consider).---------

it's sad for me to know that, i just paid for the doc today, so, any other solution (in jfree) based on java applet that can get new stock ticks (serval per second) without completely redrawn, I knew the app developed in c (c++) performs well on this topic.

thanks!!

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed May 07, 2003 4:41 pm

JFreeChart will update charts several times per second, see this applet for an example:

http://www.object-refinery.com/jfreechart/applet.html

Whether or not the wasting of CPU cycles by completely redrawing the chart is an issue for you, depends on what else your software needs to do at the same time. Try it and see.

Regards,

Dave Gilbert

talu
Posts: 9
Joined: Thu May 08, 2003 8:32 pm

How to generate data from jdbc- database

Post by talu » Wed May 14, 2003 1:32 am

Dear David,
I use the code in the doc and run the memory usage demo successfully.

the question is : in this demo you generate the realtime data from the code below..

/**
* The data generator.
*/
class DataGenerator extends Timer implements ActionListener {

/**
* Constructor.
*/
DataGenerator() {
super(100, null);
addActionListener(this);
}

/**
* Adds a new free/total memory reading to the dataset.
*
* @param event the action event.
*/
public void actionPerformed(ActionEvent event) {
long f = Runtime.getRuntime().freeMemory();
long t = Runtime.getRuntime().totalMemory();
addTotalObservation(t);
addFreeObservation(f);
}

}
-----------------------------------------------------------
but how can I modify the DataGenerator class to get data from jdbc-database, could you or any java expert help me??
Thank you in advance!!

talulu

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed May 14, 2003 9:04 am

The DataGenerator just uses the Timer class to call the actionPerformed(...) method at regular intervals. Inside the actionPerformed(...) method, new data is obtained in this case the current free and total memory values...but you could just as easily insert some JDBC code here to read values from a database table (assuming the database tables are being populated by some other process). Then the new data is added to each series, which automatically triggers a chart redraw.

Regards,

Dave Gilbert

talu
Posts: 9
Joined: Thu May 08, 2003 8:32 pm

thank you David

Post by talu » Wed May 14, 2003 12:16 pm

though I am new to java coding, I will try my best to realize the jdbc code inside, (I have tried ,but not work), thank you again..
talulu

Locked