adjust axis scale

TeeChart for ActiveX, COM and ASP
Post Reply
Russ
Newbie
Newbie
Posts: 18
Joined: Thu Nov 02, 2006 12:00 am
Location: Chattanooga, TN
Contact:

adjust axis scale

Post by Russ » Thu Nov 30, 2006 1:28 pm

Hi: I have a waveform with around 15,000 data points that I'm plotting on x-y chart. The waveform is a sinusoid that has about 128 data points per cycle. I would like for the bottom axis scale to be in "cycles", not data points. In MathCad this is done by dividing the bottom axis coordinate by a scaler N - it doesn't change the plot at all, it just relabels the axis scale to a different unit.

Here is example:Image

In this sample the bottom axis is scaled in "cycles" which are just data points divided by N, the number of data points in a cycle. Is this possible with TChart?

Best Regards,
russ

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 Nov 30, 2006 3:53 pm

Hi Russ,

I'm not 100% sure to understand what are you looking about. However you could try using the OnGetAxisLabel event to customize bottom axis labels or use custom labels as shown in the All Features\Welcome!\Axes\Labels\Custom labels example in the features demo. You'll find the demo at TeeChart's program group.
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

Russ
Newbie
Newbie
Posts: 18
Joined: Thu Nov 02, 2006 12:00 am
Location: Chattanooga, TN
Contact:

adjust axis scale

Post by Russ » Fri Dec 01, 2006 8:07 pm

Narcis: Thank you again, this works great. Here is the code I used:

Count = 0
For i = 0 To 15000 Step 100
TChart1.Axis.Bottom.Labels.Add i, Count
Count = Count + 1
Next i

This puts the labels just like I want them!

Best Regards,
russ

Post Reply