add custom horizontal axes
Posted: Mon Mar 13, 2006 3:56 am
I separate 3 series into 3 custom vertical axes.
The code is:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
// random data
Series1->FillSampleValues(1000);
Series2->FillSampleValues(1000);
Series3->FillSampleValues(1000);
// create the axes...
TChartAxis *Axis = new TChartAxis( Chart1->CustomAxes );
//Vert for series 2
Axis->StartPosition = 30;
Axis->EndPosition = 60;
Axis->Axis->Color = Series2->SeriesColor;
Series2->CustomVertAxis = Axis;
Axis = new TChartAxis( Chart1->CustomAxes );
Axis->StartPosition = 60;
Axis->EndPosition = 100;
Axis->Axis->Color = Series3->SeriesColor;
Series3->CustomVertAxis = Axis;
Series1->GetVertAxis->EndPosition = 30;
Series2->CustomVertAxis = Chart1->CustomAxes->Items[0];
Series3->CustomVertAxis = Chart1->CustomAxes->Items[1];
Chart1->LeftAxis->EndPosition = 30;
}
How to make it so that each series has each own horizontal axes?
Thank you
The code is:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
// random data
Series1->FillSampleValues(1000);
Series2->FillSampleValues(1000);
Series3->FillSampleValues(1000);
// create the axes...
TChartAxis *Axis = new TChartAxis( Chart1->CustomAxes );
//Vert for series 2
Axis->StartPosition = 30;
Axis->EndPosition = 60;
Axis->Axis->Color = Series2->SeriesColor;
Series2->CustomVertAxis = Axis;
Axis = new TChartAxis( Chart1->CustomAxes );
Axis->StartPosition = 60;
Axis->EndPosition = 100;
Axis->Axis->Color = Series3->SeriesColor;
Series3->CustomVertAxis = Axis;
Series1->GetVertAxis->EndPosition = 30;
Series2->CustomVertAxis = Chart1->CustomAxes->Items[0];
Series3->CustomVertAxis = Chart1->CustomAxes->Items[1];
Chart1->LeftAxis->EndPosition = 30;
}
How to make it so that each series has each own horizontal axes?
Thank you