Page 1 of 1

Synchronize series

Posted: Mon Jan 02, 2006 10:52 am
by 9238669
Hi!

I want to synchronize two or more series in one chart, like the "Axis_MultiScroll.pas" or "Axis_MultiRuntime.pas" example. But my series has different counts of values:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject) ;
var
   I : Integer ;
   D : TDateTime ;
begin
  D := Now ;
  for I := 0 to 100 do
   Series1.AddXY(D + I, Random(100)) ;
  for I := 0 to 200 do
   Series2.AddXY(D + I, Random(100)) ;
  Series1.AddXY(D + I, 100) ;  
  Series1.CustomVertAxis := Chart1.CustomAxes.Items[0] ;
  Series2.CustomVertAxis := Chart1.CustomAxes.Items[1] ;
end ;
The first and last value on series is always same...

Is there way to "synchronize" two series? I want to set the series which has less values to showing proportional...
I try setting minmax, and incremental, but it doesnt works...

Sorry my poor english :oops: , but my native language is pascal.

Posted: Mon Jan 02, 2006 2:27 pm
by Pep
Hi,

I'm sorry, I'm not sure what are you trying to do here. Do you want to use two series which each one have different count values with the same horiz axis ? Or you only need that the two series can be scrolled ?

Posted: Mon Jan 02, 2006 3:45 pm
by 9238669
Pep wrote:Do you want to use two series which each one have different count values with the same horiz axis ?
Yes, i want this.

Posted: Mon Jan 02, 2006 4:36 pm
by Pep
A trick could be just add a Custom Horiz. axis, assign the second serie to this custom axis and make it invisible using :
Chart1.CustomAxes[1].Visible:=false;