Automatically set an axis scale precision

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
yair
Newbie
Newbie
Posts: 15
Joined: Wed Jan 16, 2008 12:00 am

Automatically set an axis scale precision

Post by yair » Tue Apr 29, 2008 1:49 pm

I have an array of double values for the X of a fastline series which are very small (~10e-9), but the chart shows all of them on the X axis as 0's.

Is there a way to have the chart automatically scale the X-axis to a precision based on the values it has ?

Thanks and Best Regards,
Yair

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

Post by Narcís » Tue Apr 29, 2008 2:37 pm

Hi Yair,

Yes, you can set Labels.ValueFormat. For more information please read Tutorial 4 - Axis Control. You'll also find an example at All Features\Welcome !\Axes\Labels\Exponent superscript in the features demo.

Tutorials and demo can be found at TeeChart's program group.

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

yair
Newbie
Newbie
Posts: 15
Joined: Wed Jan 16, 2008 12:00 am

Post by yair » Sun May 04, 2008 8:45 am

Hi Narcis,

Thanks a lot for your continuous support.

Is there a way to show the exponent just on the edge of the axis, so it applies to all the axis' values, like in the Matlab's plot.

Also, when zooming in/out of a chart in Matlab's plot it reconfigures the exponent according to the values displayed. Is this feature supported by TeeChart or does it have to be done manually ?

Best Regards,
Yair

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 May 05, 2008 8:51 am

Hi Yair,
Is there a way to show the exponent just on the edge of the axis, so it applies to all the axis' values, like in the Matlab's plot.
You could use axes title or Annotation tool for that.
Also, when zooming in/out of a chart in Matlab's plot it reconfigures the exponent according to the values displayed. Is this feature supported by TeeChart or does it have to be done manually ?
Yes, TeeChart handles this automatically. If you using an Annotation tool you'll have to manually update that in the Zoomed and UndoneZoom events.
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

yair
Newbie
Newbie
Posts: 15
Joined: Wed Jan 16, 2008 12:00 am

Post by yair » Mon May 05, 2008 9:46 am

OK, thanks.

Another question about this:
How can I get the min and max displayed values when zoomed (In order to figure out the required exponent) ?

Regards,

Yair

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 May 05, 2008 10:01 am

Hi Yair,

Try using tChart1.Axes.Bottom.Minimum and tChart1.Axes.Bottom.Maximum in the mentioned events. If those properties haven't been updated yet you can try using the line below to force TeeChart being internally repainted.

Code: Select all

Bitmap bmp = tChart1.Bitmap;
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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply