How to detect if YValue is NUL ?
Posted: Tue Feb 05, 2008 2:50 pm
Hi support,
I use this procedure to delete data from my chart:
For selecting I use a TColorBandTool.
This works fine. But no I got a problem with an empty series. Lets say you have 3 FastLineSeries. Series 1 and 2 are filled with Samplevalues and series 3 contains no data. It is empty.
Now you run the code and got an error in this line:
MainChart[j].Delete(i);
The problem is that there is nothing to delete. So how can I check if MainChart[j].YValue is an empty data field?
I use this procedure to delete data from my chart:
Code: Select all
for i := MainChart[0].Count-1 downto 0 do
begin
tmp := MainChart[0].XValue[i];
if ((tmp >= Tool.StartValue) and (tmp <= Tool.EndValue)) then
begin
for j := 0 to MainChart.SeriesCount - 1 do
MainChart[j].Delete(i);
end;
end;
for j := 0 to MainChart.SeriesCount - 1 do
MainChart[j].XValues.FillSequence;
This works fine. But no I got a problem with an empty series. Lets say you have 3 FastLineSeries. Series 1 and 2 are filled with Samplevalues and series 3 contains no data. It is empty.
Now you run the code and got an error in this line:
MainChart[j].Delete(i);
The problem is that there is nothing to delete. So how can I check if MainChart[j].YValue is an empty data field?