Page 1 of 1
Virtual TChart?
Posted: Mon Apr 12, 2010 12:20 pm
by 10546991
Is there anywhere the concept of a set of chart series that are request there data when needed? I have an application that carries around a large amount of data, much of which needs to be plotted. Adding points to chart series essentially doubles the size of the data requirement. If there were instead a series type that could call (via an event-handler) me when it needed to know the Count of a particular series and the values for a particular index in a series, I could avoid the double storage issue, trading it for perhaps a modest speed decrease.
Thanks.
Re: Virtual TChart?
Posted: Mon Apr 12, 2010 2:48 pm
by yeray
Hi Jim,
Have you studied the possibility to store your data in a file and load the values you need only when you need them?
Right now, all the series need their arrays populated to be drawn and I can't think on a way to workaround this requirement.
On the other hand, if you can give us more information, maybe we could try to understand better your exact situation and think on a future series type that would try to optimize applications' weight (probably in detriment of speed). How would you expect the data to be given to the series?
Re: Virtual TChart?
Posted: Mon Apr 12, 2010 3:23 pm
by 10546991
I'm suggesting that a series be able to request the data when it's needed. So, e.g., the getter for XValues.Count would actually call an event, and the event handler would return the count. Similarly, the getter for XValues would call an event, returning the value for index i. This way, there would not be extra storage required for the data.
In other words, it's much the same virtual/delegation model available in e.g. TListView, where you can set OwnerData := true and handle the OnData* events to populate the list.
Re: Virtual TChart?
Posted: Wed Apr 14, 2010 9:08 am
by yeray
Hi Jim,
I've added your suggestion to the wish list to be studied for inclusion in future releases (TV52014796).
Re: Virtual TChart?
Posted: Wed Apr 14, 2010 11:47 am
by 10546991
Thanks. By the way, among the advantages of that kind of approach would be the ability to create a scrolling (along the x-axis) TChart that could request a new "window" of data when it was scrolled.