How to Share Series Between Charts
How to Share Series Between Charts
I would like to share series data between multiple charts (for instance in a multi-monitor application) but don't want to simply copy the data to redundant series. I want to share the data so that each series is in memory only once. How should I do this?
Hi.
Hmm.... Once series is created you can control where it would be displayed by changing it's ParentChart property. The problem is ParentChart is is only single chart i.e. at the same time specific series can be displayed only on one chart.
One way around this limitation is to "copy" the values from one series to another one. Something like this:
The problem with this method is the place allocated for the same data will be twice as big as for single series.
Another solution (if you don't need to show both series at the same time) is to change series ParentChart property from one chart to antoher one:
Hmm.... Once series is created you can control where it would be displayed by changing it's ParentChart property. The problem is ParentChart is is only single chart i.e. at the same time specific series can be displayed only on one chart.
One way around this limitation is to "copy" the values from one series to another one. Something like this:
Code: Select all
sourceSeries.FillSampleValues(100);
targetSeries.AssignValues(sourceSeries);
Another solution (if you don't need to show both series at the same time) is to change series ParentChart property from one chart to antoher one:
Code: Select all
series1.ParentChart := tChart1;
//switch
series1.ParentChart := tChart2;
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi,
there's also another solution which is to using two Series (one for each Chart) and set the DataSource of the Series2 to Series1, so when the data of Series1 will be modified will also be applied to the Series2.
Series2.DataSource := Series1;
there's also another solution which is to using two Series (one for each Chart) and set the DataSource of the Series2 to Series1, so when the data of Series1 will be modified will also be applied to the Series2.
Series2.DataSource := Series1;
Pep Jorge
http://support.steema.com
http://support.steema.com