Need help? i have a question

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
thanhduy79
Posts: 2
Joined: Thu Jul 12, 2018 5:10 am
antibot: No, of course not.

Need help? i have a question

Post by thanhduy79 » Thu Jul 12, 2018 5:11 am

Hey everybody,

I am trying to have multiple windows using JFrame, each being updated as time goes on with more data(using OHLCSeries). The problem is: once I have more then one window (and more then one jfreechart object) open, and I try to update one of those objects with new data, only the last created window gets all the data. So if I have 2 data streams that should go each to one chart, both go to the second/last chart.

Literally all jfreechart code is in one class, and I create multiple instances of that class. I can, for example, set different windows titles, which should be proof that they are independent, but each time I try to update a specific chart instance, only the last created one gets updated.

I'm really confused because I thought each jfreechart instance should be independent of each other, but I can't find any error in my code. Is there something I can do to make those instances independent of each other?

thanks a lot!

Locked