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
Points3D with DateTime on bottom horiz axis
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Points3D with DateTime on bottom horiz axis
Hi Scott,
Yes, you forgot this:
For further axis settings please read tutorial 4 available at TeeChart's program group.
Yes, you forgot this:
Code: Select all
p3d.XValues.DateTime = true;
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 |