SetMinMax only works right with numbers divisible by 10

TeeChart for ActiveX, COM and ASP
Post Reply
akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

SetMinMax only works right with numbers divisible by 10

Post by akiva » Thu Feb 09, 2006 11:12 am

If I use as parameters for my teeChart numbers such as 0 for min and 1002 for max I do not get the correct range on the teechart left axis.

e.g.
m_tchart.GetAxis().GetLeft().SetMinMax(0, 1002);

What I get on the chart are values between 0 and 11000 and the values are not evenly distributed either. It seems that SetMinMax only works right with numbers divisible by 10. Any ideas here??

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 09, 2006 2:14 pm

Hi akiva,

I'm not able to reproduce it here. Could you please send us an example we can run "as-is" to reproduce the problem here?

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

BTW: Could you please specify wich TeeChart version are you using?

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

akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

Post by akiva » Thu Feb 09, 2006 3:32 pm

Hi Narcis:
If you still have the files I sent you last time - you can use that exe file (exalt.exe I think its called) What you must do is go to Lab - Watch mode (see left hand upper tabs) and then go to the Access Board in lower left hand corner and make sure you are in groups tab. Drill down the tree till you get to Virtual Modules/ For Narcis / msgType0 / EU1. Now Rclick on this EU and select menu Item "update". You get a dialog box in which in display range you put in values. So put in 0 for min and 1002 for max and press OK. Now Rclick again on EU1 and select timeplot graph. Now you will see the teechart with the strange values on the left hand side.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Feb 10, 2006 10:53 am

Hi Akiva,

Sorry but I no longer have those files since I recently formated my machine. Would you be so kind to resend them again or arrange an example we can run "as-is" to reproduce the problem here?

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

akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

Post by akiva » Sun Feb 12, 2006 2:05 pm

I resentthe files you need - using yousendit.
There are 2 sites you must downloads from. They are:

Put all the files in the bin directory except for For Narcis.pak file and and convert.xml which are in the cfg directory. After bringing up EXalt you might need to load the For Narcis.pak file You do this by pressing the file icon in upper left hand side and selecting load package . Select For Narcis.pak.

http://s56.yousendit.com/d.aspx?id=13H5 ... 0HZLHYRSA1

http://s56.yousendit.com/d.aspx?id=204U ... Q468YUXRO3

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 Feb 13, 2006 9:25 am

Hi akiva,

Thanks for the files but when I run exalt.exe I get:

---------------------------
Exalt
---------------------------
An unsupported operation was attempted.
---------------------------
OK
---------------------------


this error window is shown 5 times and then comes:

---------------------------
Exalt Error
---------------------------
Exalt has encountered an error (System Fault):
Exalt.exe caused an EXCEPTION_ACCESS_VIOLATION in module Exalt.exe at 001B:004D4B1A
Read operation on address 0x4e4
Thread: Main

StackTrace:
001B:004D4B1A Exalt.exe
001B:004D4D55 Exalt.exe
001B:73EDB63A MFC42.DLL
001B:73ED7F9C MFC42.DLL
001B:004D5A8A Exalt.exe
001B:73ED9BB7 MFC42.DLL
001B:73EDA0E1 MFC42.DLL
001B:73EDA116 MFC42.DLL
001B:73EDA116 MFC42.DLL
001B:73EDA116 MFC42.DLL
001B:73EDA116 MFC42.DLL
001B:73EDA162 MFC42.DLL
001B:73EDD0DE MFC42.DLL
001B:73F00965 MFC42.DLL
001B:73F0124C MFC42.DLL
001B:73F0244C MFC42.DLL

---------------------------
OK
---------------------------


Could you please tell me how to solve that?

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

akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

Post by akiva » Mon Feb 13, 2006 10:08 am

By me it works. I forgot to mention that you have to register the 2 ocx files, by running "regsvr32 path_of_OCX_file". Maybe that's the problem.

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 Feb 13, 2006 10:33 am

Hi akiva,

Thanks. Yes, it was the problem. I've seen what you reported but I'm unable to reproduce the problem here. Could you please send us an example we can run "as-is" to reproduce the problme here or send us the code you are using to create that chart?

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

akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

Post by akiva » Mon Feb 13, 2006 11:54 am

You wrote:

"I've seen what you reported but I'm unable to reproduce the problem here"

I don't understand what you mean - have you seen the actual teechart graph with the strange values on the left vertical axis?

I also had sent you the cpp file (timeplotGraph) - in there is the code for designationg the y axis.
The main function is:

void GraphicTimePlotChart::SetLeft()
{
// Calc
double graphmin = m_FirstSeries->m_nRangeMin - CalculateGraphBufferSpace();
double graphmax = m_FirstSeries->m_nRangeMax + CalculateGraphBufferSpace();
m_tchart.GetAxis().GetLeft().SetMinMax(graphmin, graphmax);
..........
}

If you set graphmin to be 0 and graphmax to be 1002 or anything not divisble by 10 - you get weird values. perhaps this is only in the teechart version which IO am using which is vesion 5.0.5.0

- akiva

akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

Post by akiva » Tue Feb 14, 2006 1:29 pm

Hi Narcis:
anything new about this issue?
thanks,
akiva

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Feb 15, 2006 10:54 am

Hi akiva,

In that case, when the labels can't be fitted at are not divisible, the solution is adding the labels you wish manually, as done in the "custom labels" example at the TeeChart features demo, or using OnGetNextAxisLabel event to customize the existing labels or you could also custom draw on TeeChart's canvas the labels you wish in addition to the existing ones.

In case you just wanted to display the first and last label then you should set the axis increment to the difference between the two values.
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

akiva
Newbie
Newbie
Posts: 17
Joined: Fri Nov 15, 2002 12:00 am

Post by akiva » Wed Feb 15, 2006 6:40 pm

thanks - I see my problem now - that I was calling SetValueFormat("100") and SetIncrement(0) when the min is 0 and the max is 1003 and because of this I was getting crazy values on axis ( up to 11000). Now I call SetValueFormat("0") if I have nondivisble by 10 numbers.
- akiva

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 16, 2006 9:30 am

You're welcome akiva. I'm glad you finally solved your problems.
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

Post Reply