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
add custom horizontal axes
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Herman,
It's almost the same as with vertical axes. You just need to set custom axes Horizontal property to true and assign them to the series as custom horizontal axis:
It's almost the same as with vertical axes. You just need to set custom axes Horizontal property to true and assign them to the series as custom horizontal axis:
Code: Select all
Axis->Horizontal:=true;
Series3->CustomHorizAxis:=Chart1->CustomAxes->Items[0];
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |