Points3D with DateTime on bottom horiz axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
skruegel
Newbie
Newbie
Posts: 5
Joined: Wed Jun 25, 2008 12:00 am
Contact:

Points3D with DateTime on bottom horiz axis

Post by skruegel » Thu Nov 04, 2010 2:49 pm

I'm having a problem with setting on of the axes of my chart to a DateTime format. Here is a code snippet:

public Form1()
{
InitializeComponent();
tChart1.Series.Clear();

// Test data
double[] yData = new double[10];
double[] zData = new double[10];
DateTime[] xData = new DateTime[10];
for (int index = 0; index < 10; index++)
{
TimeSpan ts = new TimeSpan(index, 0, 0, 0);
xData[index] = DateTime.Now + ts;
yData[index] = index;
zData[index] = 20 * Math.Sin(index * Math.PI / 5);
}
Points3D p3d = new Points3D();
p3d.Add(xData, zData, yData);
tChart1.Series.Add(p3d);
}

I feel like I've left out a step. Any ideas?

Best regards,
Scott

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

Re: Points3D with DateTime on bottom horiz axis

Post by Narcís » Thu Nov 04, 2010 3:00 pm

Hi Scott,

Yes, you forgot this:

Code: Select all

            p3d.XValues.DateTime = true;
For further axis settings please read tutorial 4 available 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

Post Reply