area series displays blank region

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

area series displays blank region

Post by Ed » Thu Oct 27, 2005 2:34 pm

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

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Nov 02, 2005 11:12 am

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.

Post Reply