Minimum and maximum values

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Minimum and maximum values

Post by Spea_User » Mon Dec 18, 2006 9:02 am

Hi! I have a problem with teechart (Borland c++ Builder 6)
I want to set the maximum and minimun values on bottom axes because i draw many series with values too different
I use this code:

oChart->LeftAxis->Automatic = FALSE;
oChart->LeftAxis->SetMinMax (2.5,5);

but, after this code, on the axis there aren't any values. I'm agree to have automatic values but not for minimum and maximum values!

Second question is the following:
In the bottom axis i have many values...I want to draw a "special" labels with mean, low quartile and high quartile,
I use this code:

oAxisLabel = graFreqDistr->BottomAxis->Items->Add(rXValue, rTmpLabel);
oAxisLabel->Font->Height = 14;
oAxisLabel->Transparent = FALSE;
oAxisLabel->Shadow->Size = 0;

but it doesn' work correctly! I think that two problems are correlated but i want a confirm from you!

Thanks and best regards!

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 Dec 18, 2006 10:15 am

Hi Spea_User,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

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
Image Image Image Image Image Image
Instructions - How to post in this forum

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 Dec 18, 2006 12:55 pm

Hi Spea_User,

Thanks for the example.
but, after this code, on the axis there aren't any values. I'm agree to have automatic values but not for minimum and maximum values!
This is because you are not populating the series properly, instead of using Add method with 2 integer parameters you should AddXY method:

Code: Select all

  for (int i=0; i<10; i++)
  {
	graFreqDistr->Series[0]->AddXY(i,i);
  }
Otherwise the compiler thinks the 2nd parameter is a label and therefore it's being drawn in the axis.
but it doesn' work correctly! I think that two problems are correlated but i want a confirm from you!
In your example custom labels are not displayed because the left axis range is too small. You are only adding 10 points to the series. This means left axis ranges from 0 to 10. Since custom labels are drawn at 123, 466 and 300 they can not be displayed. To solve this you have 2 options:

1. Add more points to the series, for example, make your for loop from 0 to 500.
2. Set a higher left axis maximum so that custom labels are on its range.
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

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Mon Dec 18, 2006 1:22 pm

narcis wrote:This is because you are not populating the series properly, instead of using Add method with 2 integer parameters you should AddXY method:

for (int i=0; i<10; i++)
{
graFreqDistr->Series[0]->AddXY(i,i);
}
I try also addxy but i get the same result. it doesn't work!
I want to have minimum and maximum values configurable and not based on the values in the serie! With your example minimum and maximum values are always automatic also if I insert:

graFreqDistr->BottomAxis->Automatic = FALSE;
graFreqDistr->BottomAxis->Minimum = 0;
graFreqDistr->BottomAxis->Maximum = 500;

narcis wrote:Otherwise the compiler thinks the 2nd parameter is a label and therefore it's being drawn in the axis.
In your example custom labels are not displayed because the left axis range is too small. You are only adding 10 points to the series. This means left axis ranges from 0 to 10. Since custom labels are drawn at 123, 466 and 300 they can not be displayed. To solve this you have 2 options:

1. Add more points to the series, for example, make your for loop from 0 to 500.
2. Set a higher left axis maximum so that custom labels are on its range.
Here the problem is the following:

graFreqDistr->Axes is always null, it doesn't depend on the values number inserted, i can insert 100000 values but graFreqDistr->Axes still NULL!

Can you help me, please???
Please refer the example I send you before!

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 Dec 18, 2006 1:30 pm

Hi Spea_User,

Which TeeChart version are you using? What I posted works fine for me here usinv 7.07 VCL which is the latest version available at the client area for BCB 6.
I try also addxy but i get the same result. it doesn't work!
I want to have minimum and maximum values configurable and not based on the values in the serie! With your example minimum and maximum values are always automatic also if I insert:

graFreqDistr->BottomAxis->Automatic = FALSE;
graFreqDistr->BottomAxis->Minimum = 0;
graFreqDistr->BottomAxis->Maximum = 500;


In your project, changing Add for AddXY works fine for me here using v7.07.
graFreqDistr->Axes is always null, it doesn't depend on the values number inserted, i can insert 100000 values but graFreqDistr->Axes still NULL!
Using v7.07 I can't reproduce this problem either.
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

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Mon Dec 18, 2006 2:20 pm

narcis wrote: Which TeeChart version are you using? What I posted works fine for me here usinv 7.07 VCL which is the latest version available at the client area for BCB 6.


Now I have installed 7.07 VCL but unbelievably I can't insert a serie values!

for (int i=0; i<1000; i++)
{
pLineSeries->AddXY(i,i,"");
}

but if third parameter empty generate an access violation error and if I insert this values the series is not showed!
What is the method for insert a series? Please write me an example that insert a series values because i can't, thank you!
narcis wrote: Using v7.07 I can't reproduce this problem either.
Maybe it's solved!

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 Dec 18, 2006 2:32 pm

Hello,
What is the method for insert a series? Please write me an example that insert a series values because i can't, thank you!
You can use AddXY method with X values and Y values parameteres, for example:

Code: Select all

pLineSeries->AddXY(i,i); 
or use AddXY setting a point label (even its and empty string) and the point's color:

Code: Select all

pLineSeries->AddXY(i,i,"",clTeeColor); 
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

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Mon Dec 18, 2006 2:43 pm

I upload in the newsgroup a sample, please help me because my customer make lot of pressure on it!

Best regards

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 Dec 18, 2006 2:51 pm

Hello,

It works fine for me here using your project and adding the color parameter at the AddXY method call, as I told you in my previous message.

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  int i;

  for (i=0; i<1000; i++)
  {
	graMeasDistr->Series[0]->AddXY(i, i, "fali", clTeeColor);
  }
}
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

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Mon Dec 18, 2006 3:15 pm

narcis wrote:
It works fine for me here using your project and adding the color parameter at the AddXY method call, as I told you in my previous message.

Code: Select all

void __fastcall TForm1::Button1Click(TObject *Sender)
{
  int i;

  for (i=0; i<1000; i++)
  {
	graMeasDistr->Series[0]->AddXY(i, i, "fali", clTeeColor);
  }
}
It doesn't work on my pc! I can't see a line!
Do you have any idea? Builder version can influence this operation? I have Version 6.0 (Build 10.166)

Thank you very much!

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 Dec 18, 2006 3:35 pm

Hello,

Your project works fine for me here. I've attached it at the newsgroups. I also included the projects .exe. Can you please test if it works fine at your end?

Have you checked that your BCB6 has v7.07 packages properly installed? Are v7.07 packages enabled at Project\Options\Packages and are its Include and Lib paths at Project\Options\Directories/Conditionals's Include and Library paths respectively?
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

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Mon Dec 18, 2006 3:44 pm

narcis wrote:Hello,

Your project works fine for me here. I've attached it at the newsgroups. I also included the projects .exe. Can you please test if it works fine at your end?

Have you checked that your BCB6 has v7.07 packages properly installed? Are v7.07 packages enabled at Project\Options\Packages and are its Include and Lib paths at Project\Options\Directories/Conditionals's Include and Library paths respectively?
When I recompile your project it doesn't work! Before install 7.07 i uninstalled 7.05, this operation make a problem? I have to install 7.00 and after install all update? Can I verify date and time of key file??
Please help me...i'm crazy!!!

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 Dec 18, 2006 3:49 pm

Hi Spea_User,

I forgot to tell you that you should have BCB 6 Update 4 installed to have v7.07 working fine. I'd recommend you to install any TeeChart version you may have on your machine, install BCB 6 Update 4 and reinstall TeeChart v7.07.
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

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Mon Dec 18, 2006 3:56 pm

narcis wrote:Hi Spea_User,

I forgot to tell you that you should have BCB 6 Update 4 installed to have v7.07 working fine. I'd recommend you to install any TeeChart version you may have on your machine, install BCB 6 Update 4 and reinstall TeeChart v7.07.
The builder is updated up to update 4 and teechart v.7.07 is ONLY installed.
graMeasDistr->Series[0]->AddXY(1,1, "" ------> with this parameter empty Access violation generated, for me it's correlated with my problem)!!
Do you have any suggestion/idea??

Best regards

Spea_User
Newbie
Newbie
Posts: 9
Joined: Wed Mar 10, 2004 5:00 am

Post by Spea_User » Tue Dec 19, 2006 7:05 am

9336261 wrote:
narcis wrote:Hi Spea_User,

I forgot to tell you that you should have BCB 6 Update 4 installed to have v7.07 working fine. I'd recommend you to install any TeeChart version you may have on your machine, install BCB 6 Update 4 and reinstall TeeChart v7.07.
The builder is updated up to update 4 and teechart v.7.07 is ONLY installed.
graMeasDistr->Series[0]->AddXY(1,1, "" ------> with this parameter empty Access violation generated, for me it's correlated with my problem)!!
Do you have any suggestion/idea??

Best regards
If you have no idea I install 6.06 and try to work with it because i have pressure customer!
Thank you very much for your support, I hope to receive good news today :-)!

Post Reply