How to control the displayed number of digit number

TeeChart for ActiveX, COM and ASP
Post Reply
David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

How to control the displayed number of digit number

Post by David » Tue Jul 06, 2010 3:10 am

I am trying to set axis to log with m_chart1.GetAxis().GetLeft().SetLogarithmic(TRUE) and then I set the min and max Y with m_chart1.GetAxis().GetLeft().SetMinMax(0.0001,10), but the problem is that the minimum value displayed on the chart is 0.000 instead of 0.0001. So how can I control the number of valid digit number after decimal point?

I am using Teechart v7.

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Re: How to control the displayed number of digit number

Post by David » Tue Jul 06, 2010 3:28 am

Problem solved with m_chart1.GetAxis().GetLeft().GetLabels().SetValueFormat("0.0000");

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to control the displayed number of digit number

Post by Yeray » Tue Jul 06, 2010 9:09 am

Hi David,

Note that by default, the axes labels are set to be formatted to show three decimals "#,##0.###". If you want to show one more, you can change it for "#,##0.####":

Code: Select all

TChart1.Axis.Left.Labels.ValueFormat = "#,##0.####"
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

David
Advanced
Posts: 203
Joined: Tue Nov 08, 2005 5:00 am

Re: How to control the displayed number of digit number

Post by David » Tue Jul 06, 2010 9:58 am

Noted with thanks.

Post Reply