I am using TeeChart 8.02 with BCB 6.0. I am looking for example BCB code to allow me to add custom axes to a chart.
Thank you.
BCB Code for adding custom axes
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 |
labels on a custom axis
Thank you for the code snippet.
I am using the following code:
TChartAxis *TpAxis;
TpAxis = new TChartAxis(Chart1->CustomAxes);
TpAxis->Horizontal = true;
TpAxis->Minimum =0;
TpAxis->Maximum = 90;
Series2->CustomHorizAxis = TpAxis;
TpAxis->PositionPercent = 5;
TpAxis->Items->Add(10,"220");
to add a horizontal axis to the chart. The axis does appear when I run the program. However, the label "220" is not appearing, as it would if I used the bottom axis. What do I need to do to add labels to a custom axis. Also, is there a way to get the label above the axis, instead of below.
Thank you for your assistance.
I am using the following code:
TChartAxis *TpAxis;
TpAxis = new TChartAxis(Chart1->CustomAxes);
TpAxis->Horizontal = true;
TpAxis->Minimum =0;
TpAxis->Maximum = 90;
Series2->CustomHorizAxis = TpAxis;
TpAxis->PositionPercent = 5;
TpAxis->Items->Add(10,"220");
to add a horizontal axis to the chart. The axis does appear when I run the program. However, the label "220" is not appearing, as it would if I used the bottom axis. What do I need to do to add labels to a custom axis. Also, is there a way to get the label above the axis, instead of below.
Thank you for your assistance.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi MTW,
You may need to set chart margins as custom axes don't set them automatically, for example:
If this doesn't help please send us a simple example project we can run "as-is" to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
You may need to set chart margins as custom axes don't set them automatically, for example:
Code: Select all
Chart1->MarginBottom = 10;
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
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 |