Add extra ChartValueList on TLineSeries
Posted: Wed Jan 27, 2010 2:16 pm
Hello!
I have several TLineSeries containing lots of data. Now I would like to filter the "visible" data y-serie but still keep my original values.
Of course I could have duplicate TLineSeries one containing the original data (invisible) and another TLineSeries containing the filtered data, or a separate array containing the original. The proble is my project is huge and this would generate changes all over!
My ide is to add a a ChartValueList to the TLineSeries and save the original data there, is this a good ide?
ChartValueList := TChartValueList.Create(Series3, 'UnFiltered');
Series3.ValuesList.Add(ChartValueList);
Now Series3.ValuesList.Count reports 4! I thought it would now be 3, X, Y and UnFiltered!?
Then I load my original data:
For I := 0 To Series3.Count - 1 Do
Begin
Series3.ValuesList[2].Items := Series3.YValue;
End;
Do I have to dimension the Items array before assigning data?
All this seems to worke fine, except for one thing. When I close my application I get an EInvalidPointer exception.
Any ideas?
Regards, Mikael
I have several TLineSeries containing lots of data. Now I would like to filter the "visible" data y-serie but still keep my original values.
Of course I could have duplicate TLineSeries one containing the original data (invisible) and another TLineSeries containing the filtered data, or a separate array containing the original. The proble is my project is huge and this would generate changes all over!
My ide is to add a a ChartValueList to the TLineSeries and save the original data there, is this a good ide?
ChartValueList := TChartValueList.Create(Series3, 'UnFiltered');
Series3.ValuesList.Add(ChartValueList);
Now Series3.ValuesList.Count reports 4! I thought it would now be 3, X, Y and UnFiltered!?
Then I load my original data:
For I := 0 To Series3.Count - 1 Do
Begin
Series3.ValuesList[2].Items := Series3.YValue;
End;
Do I have to dimension the Items array before assigning data?
All this seems to worke fine, except for one thing. When I close my application I get an EInvalidPointer exception.
Any ideas?
Regards, Mikael