Axis ValueFormat
Hi ,
I am using TeeChart5.0 control
To set values on the Y Axis I am using SetMinMax() TeeChart function which takes 2 parameter MinY and MaxY ...
suppose,
MinY = 0.099999904632568359
MaxY = 0.10000002384185791
So while plotting these values on the actual graph . this SetMinMax() rounds these values so it becomes MinY = 0.1 and MaxY = 0.1
so all the values on Y Axis I am getting as 0.1.
----------------------------------------------------
I want to increase the decimal places on the Y-Axis when displaying it on to control... So I will get following values on the graph
e.g
MinY = 0.09999990
MaxY = 0.10000002
So could you please let me know how I will achieve this?
Regards
Abhijit Nimbalkar
I am using TeeChart5.0 control
To set values on the Y Axis I am using SetMinMax() TeeChart function which takes 2 parameter MinY and MaxY ...
suppose,
MinY = 0.099999904632568359
MaxY = 0.10000002384185791
So while plotting these values on the actual graph . this SetMinMax() rounds these values so it becomes MinY = 0.1 and MaxY = 0.1
so all the values on Y Axis I am getting as 0.1.
----------------------------------------------------
I want to increase the decimal places on the Y-Axis when displaying it on to control... So I will get following values on the graph
e.g
MinY = 0.09999990
MaxY = 0.10000002
So could you please let me know how I will achieve this?
Regards
Abhijit Nimbalkar
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
You can use something like this:
You can use something like this:
Code: Select all
TChart1.Axis.Bottom.Labels.ValueFormat = "0.00000000,#########"
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 |
Hi ,
I am using TeeChart 5 control to draw the line series ..
I am plotting line series . On the Y axis I am having some decimals,
According to your suggestion I have set the Value format for Y Axis label i.e
TChart1.Axis.Bottom.Labels.ValueFormat = "0.#########"
OutPut that I am getting is
case 1:
0.10000002 - Max Y
0.1
0.09999998
0.09999996
0.09999994
0.09999992 - Min Y
I don’t want the 0.1 , I want it should be 0.100000000 in this case ....
But for above case I am ok with above set value format,
Input(wihthout setting value format)
case 2:
0.10000000 Max Y
0.09998000 0.09996000
0.09994000
0.09992000 - Min Y
exepected out put with the 0.######## value format that I want for above input
0.10000 Max Y
0.99998
0.09996 0.09994
0.09992 Min Y
All labels visible at the same time should have the same precision and only the number of decimals as applicable.
I want to reduce amount of decimal places automatically if the last decimal digits containing 0's in all the values on Y axis(i.e last zero should contain in the all the values in the Min and Max range) those 0's I want to supress .
I think the current valueFormat that I am using is right i.e(0.########),
but in only case -1 is exception for that , but in case -2 that format is right . Could you please let me know how I will achieve both the cases.
Regards
Abhijit
I am using TeeChart 5 control to draw the line series ..
I am plotting line series . On the Y axis I am having some decimals,
According to your suggestion I have set the Value format for Y Axis label i.e
TChart1.Axis.Bottom.Labels.ValueFormat = "0.#########"
OutPut that I am getting is
case 1:
0.10000002 - Max Y
0.1
0.09999998
0.09999996
0.09999994
0.09999992 - Min Y
I don’t want the 0.1 , I want it should be 0.100000000 in this case ....
But for above case I am ok with above set value format,
Input(wihthout setting value format)
case 2:
0.10000000 Max Y
0.09998000 0.09996000
0.09994000
0.09992000 - Min Y
exepected out put with the 0.######## value format that I want for above input
0.10000 Max Y
0.99998
0.09996 0.09994
0.09992 Min Y
All labels visible at the same time should have the same precision and only the number of decimals as applicable.
I want to reduce amount of decimal places automatically if the last decimal digits containing 0's in all the values on Y axis(i.e last zero should contain in the all the values in the Min and Max range) those 0's I want to supress .
I think the current valueFormat that I am using is right i.e(0.########),
but in only case -1 is exception for that , but in case -2 that format is right . Could you please let me know how I will achieve both the cases.
Regards
Abhijit
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
Using the ValueFormat I suggested before works fine for me here:
Could you please test if it works fine at your end?
We would also appreciate if you started a new topic for your new questions as this thread has already gone off it's initial subject and discussions become more difficult to follow.
Thanks in advance.
Using the ValueFormat I suggested before works fine for me here:
Code: Select all
TChart1.Axis.Bottom.Labels.ValueFormat = "0.00000000,#########"
We would also appreciate if you started a new topic for your new questions as this thread has already gone off it's initial subject and discussions become more difficult to follow.
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 |
Hi ,
I have tried but this solution is not suitable to my problem.Could you please let me know whether u understood my problem.
If not let me know I will open new thread for my new questions...
Or could you please mail me at
a.nimbalkar@fugro.in , so I can send you some images to your mail account so you will easily understand my problem...
Regards
Abhijit Nimbalkar
I have tried but this solution is not suitable to my problem.Could you please let me know whether u understood my problem.
If not let me know I will open new thread for my new questions...
Or could you please mail me at
a.nimbalkar@fugro.in , so I can send you some images to your mail account so you will easily understand my problem...
Regards
Abhijit Nimbalkar
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
I thought I had understood your problem but it seems I hadn't.
It would be great if you could send us a simple example project we can run "as-is" at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Also please notice that we don't provide direct e-mail support except for Pro-Support subscribers.
Thanks in advance.
I thought I had understood your problem but it seems I hadn't.
It would be great if you could send us a simple example project we can run "as-is" at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Also please notice that we don't provide direct e-mail support except for Pro-Support subscribers.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
I have read the e-mail you sent to Pep. In that case I recommand you to read how to set format strings here:
http://www.freepascal.org/docs-html/rtl ... float.html
Since TeeChart Pro ActiveX is a COM wrapper of TeeChart Pro VCL you need to check Object Pascal (Delphi) documentation.
Microsoft's equivalents are here:
http://msdn2.microsoft.com/en-us/library/0c899ak8.aspx
Hope this helps!
I have read the e-mail you sent to Pep. In that case I recommand you to read how to set format strings here:
http://www.freepascal.org/docs-html/rtl ... float.html
Since TeeChart Pro ActiveX is a COM wrapper of TeeChart Pro VCL you need to check Object Pascal (Delphi) documentation.
Microsoft's equivalents are here:
http://msdn2.microsoft.com/en-us/library/0c899ak8.aspx
Hope this helps!
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 |
Hi ,
Thanks for your help.
But this is not sufficient .. I am not able to resolve my problem ..
If I pass follwing values ,
SetMinMax(0.9999998 , 1.0000000)
To set values on the Y Axis .... the values that I am getting on Y Axis is
1.0 every where.. because SetMinMax internally round above given values.
I don't want SetMinMax() rounds those values . how I will achieve that .. one method I know is that set ValueFormat property .. Could you please let me know any alternative solution?
Regards
Abhijit Nimbalkar
Thanks for your help.
But this is not sufficient .. I am not able to resolve my problem ..
If I pass follwing values ,
SetMinMax(0.9999998 , 1.0000000)
To set values on the Y Axis .... the values that I am getting on Y Axis is
1.0 every where.. because SetMinMax internally round above given values.
I don't want SetMinMax() rounds those values . how I will achieve that .. one method I know is that set ValueFormat property .. Could you please let me know any alternative solution?
Regards
Abhijit Nimbalkar
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
Could you please confirm that you are setting labels ValueFormat exactly like this?
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.
Could you please confirm that you are setting labels ValueFormat exactly like this?
Code: Select all
TChart1.Axis.Bottom.Labels.ValueFormat = "0.00000000,#########"
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 |
Hi,
I have uploaded HistogramSamples.zip on your server . In that I am able to reproduce my problem.
Please take a look in HistogramSampleDlg.cpp...
In that I set values for Left Axis as
m_chart.GetAxis().GetLeft().SetMinMax(0.09999998 , 0.10000002);
But on the Axis if you run this application you can see 0.1 every where...
I want values should be display as following,
0.09999998
0.09999999
0.10000000
0.10000002
For this I have used the your ValueFormat property...
ValueFormat = "0.########"
But there is problem while setting this property ... I will get the Values on left Axis
0.09999998
0.09999999
0.1
0.10000002
because all the zero's will supress .....
I don't like 0.1 ..
second case :
If I used ValueFormat = "0.00000000"
Consider values is like this...
0.09996000
0.09997000
0.09998000
0.09999000
0.10000000
I don't want all the trailing zeros should be display...
I want output should be ..
0.09996
0.09997
0.09998
0.09999
0.10000
All labels visible at the same time should have the same precision and only the number of decimals as applicable...
Note : Values can not be in the same range .. it may vary ...
Regards
Abhijit
I have uploaded HistogramSamples.zip on your server . In that I am able to reproduce my problem.
Please take a look in HistogramSampleDlg.cpp...
In that I set values for Left Axis as
m_chart.GetAxis().GetLeft().SetMinMax(0.09999998 , 0.10000002);
But on the Axis if you run this application you can see 0.1 every where...
I want values should be display as following,
0.09999998
0.09999999
0.10000000
0.10000002
For this I have used the your ValueFormat property...
ValueFormat = "0.########"
But there is problem while setting this property ... I will get the Values on left Axis
0.09999998
0.09999999
0.1
0.10000002
because all the zero's will supress .....
I don't like 0.1 ..
second case :
If I used ValueFormat = "0.00000000"
Consider values is like this...
0.09996000
0.09997000
0.09998000
0.09999000
0.10000000
I don't want all the trailing zeros should be display...
I want output should be ..
0.09996
0.09997
0.09998
0.09999
0.10000
All labels visible at the same time should have the same precision and only the number of decimals as applicable...
Note : Values can not be in the same range .. it may vary ...
Regards
Abhijit
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
First of all please notice that splitted the original topic in two for topic coherence.
Regarding the example project, where have you sent it? I can't find it neither at news://www.steema.net/steema.public.attachments newsgroup nor at our upload page.
Thanks in advance.
First of all please notice that splitted the original topic in two for topic coherence.
Regarding the example project, where have you sent it? I can't find it neither at news://www.steema.net/steema.public.attachments newsgroup nor 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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
Coincidentally Pep just forwarded me your example .
I'll look at it and get back to you ASAP.
Coincidentally Pep just forwarded me your example .
I'll look at it and get back to you ASAP.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
I'm not able to uncompress the example package as it asks for a password. Would you be so kind to let us know the password we should use?
Thanks in advance.
I'm not able to uncompress the example package as it asks for a password. Would you be so kind to let us know the password we should use?
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Abhijit,
Thanks for the information.
Setting ValueFormat as I suggested (see code snippet below) works fine for me here as you can see in the image.
You need to set ValueFormat using Custom Numeric Format Strings
Thanks for the information.
Setting ValueFormat as I suggested (see code snippet below) works fine for me here as you can see in the image.
Code: Select all
void CHistogramSampleDlg::OnBeforeDrawAxesTChart()
{
m_chart.GetAxis().GetBottom().SetStartPosition(0);
m_chart.GetAxis().GetBottom().SetEndPosition(100);
m_chart.GetAxis().GetBottom().SetPositionPercent(0);
m_chart.GetAxis().GetLeft().SetStartPosition(0);
m_chart.GetAxis().GetLeft().SetEndPosition(100);
m_chart.GetAxis().GetLeft().SetPositionPercent(0);
m_chart.GetAxis().GetBottom().SetMinMax(0,1);
m_chart.GetAxis().GetBottom().SetIncrement(0.25);
m_chart.GetAxis().GetLeft().SetMinMax(0.09999998 , 0.10000002);
//m_chart.GetAxis().GetLeft().GetLabels().SetValueFormat("0.########");
m_chart.GetAxis().GetLeft().GetLabels().SetValueFormat("0.00000000,########");
//m_chart.GetAxis().GetLeft().SetIncrement(0.10000002 - 0.09999998 /2);
}
You need to set ValueFormat using Custom Numeric Format Strings
You'll have to choose an arbitrary number of digits as you do for label 0.10000I don't want all the trailing zeros should be display...
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 |