A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
pixaround
- Posts: 10
- Joined: Sat Jan 26, 2008 11:39 pm
Post
by pixaround » Sun Feb 03, 2008 4:42 pm
I'm working on the graph which refreshes everytime the dataset changed. How can I do that? I'm appreciate all of your help. Thanks
-
lax4mike
- Posts: 6
- Joined: Thu Jan 31, 2008 11:53 pm
Post
by lax4mike » Wed Feb 13, 2008 6:23 pm
how did you do it?
-
pixaround
- Posts: 10
- Joined: Sat Jan 26, 2008 11:39 pm
Post
by pixaround » Wed Feb 13, 2008 6:53 pm
I think everytimes you add new data to dataset it will invoke the chart refresh. My program has a thread which processes incoming data , filters it and feed them to the dataset. You need to turn off the invoke and then turn on for some period if you continuously feed the data too fast though for better performance
-
lax4mike
- Posts: 6
- Joined: Thu Jan 31, 2008 11:53 pm
Post
by lax4mike » Wed Feb 13, 2008 6:56 pm
i looked for a refreshChart() function or something, but couldn't find one. does it exist?
-
pixaround
- Posts: 10
- Joined: Sat Jan 26, 2008 11:39 pm
Post
by pixaround » Thu Feb 14, 2008 1:11 am
I mean when you add a new data to dataset. It will automatically invoke redrawing the chart. You don't need to implicitly call function to invoke it unless you turn it off.
-
lax4mike
- Posts: 6
- Joined: Thu Jan 31, 2008 11:53 pm
Post
by lax4mike » Thu Feb 14, 2008 8:59 pm
i found an answer. i used chartPanel.setChart and chartPanel.repaint