Page 1 of 1

area series displays blank region

Posted: Thu Oct 27, 2005 2:34 pm
by 9336214
I am using an TAreaSeries (with MultiArea set to maStacked) and am getting a blank region when I do not add all x values for the series.

Here is an image:

http://www.retireneeds.com/blankareaseries.jpg

What I want to do is have a null value in the series between the positive and negative values--but I do not have values for every item on the X axis, i.e. I am using AddXY(...);

How can I fix this?

Thanks
Ed Dressel

My code is as follows:

procedure TForm1.UpdateDisplay;
var
I: Integer;
begin
Series1.Clear;

if ComboBox1.ItemIndex = 0 then
begin
//method #1: Works fine
for I := 0 to 9 do // Iterate
Series1.AddXY(I, -I);
Series1.AddNull(9);
for I := 0 to 9 do // Iterate
Series1.AddXY(I + 10, I);
end
else
begin
//method #2: Does not work
for I := 0 to 3 do // Iterate
Series1.AddXY(I*3, -I);
Series1.AddNull(9);
for I := 0 to 9 do // Iterate
Series1.AddXY(I+10, I);
end;
end;

My full project code is here:

http://www.retireneeds.com/blankareaseries.zip

Posted: Wed Nov 02, 2005 11:12 am
by Pep
Hi Ed,

using the same technique I show you in your other post about stacked area, you could check for Null or 0 points and remove them from the ValueList.