[Solved] SeriesBandTool when series are not the same length

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

[Solved] SeriesBandTool when series are not the same length

Post by bertrod » Mon Jul 31, 2006 7:45 am

Hello,

I have a problem using SeriesBandTool when 2 series are not the same length. I noticed that the seriesBandTool always tries to "link" the first points of each series, and the last points.

See my picture below to illustrate this problem: the seriesBandTool should draw only between the flags, because the left flag is the first point of the series2, and the right flag is the last point.

Image

I could also reproduce this in the TeeChartOffice.

TeeChart Version : 7.04
Last edited by bertrod on Wed Aug 02, 2006 7:34 am, edited 1 time in total.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Jul 31, 2006 11:52 am

Hi bertrod,

I could reproduce the behaviour you report here. I've added an entry to our wish-list to adda Style property to this tool so that user can select how he/she would like the tool to behave.

In the meantime, you can use a fake series with the values of a sub-range of the larger series values:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject); 
var i: Integer;
begin
  Series1.FillSampleValues();

  for i:=5 to 15 do
  begin
    Series2.AddXY(i,random*1000);
    Series3.AddXY(Series1.XValue[i], Series1.YValue[i]);
  end;

  Series3.Pen.Visible:=false;

  ChartTool1.Series:=Series2;
  ChartTool1.Series2:=Series3;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Wed Aug 02, 2006 7:34 am

Thanks, it works with your code. I must say that you had a good idea, i hadn't thought about doing it your way.

Post Reply