export data with datetime axis

TeeChart for ActiveX, COM and ASP
Post Reply
bahmed
Newbie
Newbie
Posts: 4
Joined: Tue Mar 04, 2003 5:00 am

export data with datetime axis

Post by bahmed » Tue Dec 16, 2003 9:26 pm

Hi,

I am trying to export data from an activeX teeChart using "Editor dialog".
The x-axis is in "datetime" format but the exported data shows "floating point" vlaues for X-axis (as shown below).

----- code for pupulating the series -----
MyChart.Axis.Bottom.Labels.DateTimeFormat="MM/dd/yy hh:mm:ss";
MyChart.Axis.Bottom.AutomaticMaximum=false;
MyChart.Axis.Bottom.Maximum = dblStopTime;
MyChart.Axis.Bottom.AutomaticMinimum=false;
MyChart.Axis.Bottom.Minimum = dblStartTime;

/* rs is a recordset with two field v1 and v2 in it */
MyChart.Series(0).DataSource=rs;
MyChart.Series(0).XValues.ValueSource="v1";
MyChart.Series(0).YValues.ValueSource="v2";

// if I add following lines then I can get the datetime to
// show up in the export, but "floating point value" of the
// time still shows up in the exported .txt data
//
//MyChart.Series(0).LabelsSource = "v1";
//MyChart.Axis.Bottom.Labels.Style= TeeChart.EAxisLabelStyle.talValue;


------------- output of the data export-------
0 37965 45.1049118041992
1 37965.0034722222 44.8395805358887
2 37965.0069444444 44.7511405944824
3 37965.0104166667 44.4858207702637
4 37965.0138888889 44.3973808288574
5 37965.0173611111 43.9551696777344
6 37965.0208333333 43.8667297363281
7 37965.0243055556 43.6898498535156
8 37965.0277777778 43.5129585266113
-------------------------------------


---------- output with the extra two lines ---------
0 12/10/2003 37965 2.47999954223633
1 12/10/2003 12:05:00 AM 37965.0034722222 2.47999954223633
2 12/10/2003 12:10:00 AM 37965.0069444444 2.45166778564453
3 12/10/2003 12:15:00 AM 37965.0104166667 2.44166946411133
4 12/10/2003 12:20:00 AM 37965.0138888889 2.44166946411133
5 12/10/2003 12:25:00 AM 37965.0173611111 2.375
------------------------------------------

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Dec 17, 2003 12:37 pm

Have you set the XValues of the Series to DateTime ?

MyChart.Series(0).XValues.DateTime = True

Josep Lluis Jorge
http://support.steema.com

bahmed
Newbie
Newbie
Posts: 4
Joined: Tue Mar 04, 2003 5:00 am

Post by bahmed » Wed Dec 17, 2003 3:21 pm

Yes I set the DateTime property to true (which was not shown in the code segment). The problem is not in the display of the chart (or graph) but in exporting the data to a txt file using TeeChart Editor dialog's Export-> Data -> (Format: txt) & (Include: Point Index, Point Label)...

I want to export the time in "actual date time" not in floating point value


Look at the exported text data: the second column is souposed to be date-time.
------------- output of the data export-------


0 37965.0000000000 45.1049118041992
1 37965.0034722222 44.8395805358887
2 37965.0069444444 44.7511405944824
3 37965.0104166667 44.4858207702637
4 37965.0138888889 44.3973808288574
5 37965.0173611111 43.9551696777344
6 37965.0208333333 43.8667297363281
7 37965.0243055556 43.6898498535156
8 37965.0277777778 43.5129585266113
-------------------------------------

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Dec 18, 2003 9:04 am

Which TeeChart version are you using ?
It works fine here using the latest TeeChart Pro v6.04. I've attached one example to the steema.public.attachments newsgroup, could you please test it if works fine for you ?

Josep Lluis Jorge
http://support.steema.com

bahmed
Newbie
Newbie
Posts: 4
Joined: Tue Mar 04, 2003 5:00 am

Post by bahmed » Fri Dec 19, 2003 7:16 pm

I am using version 5.0.5.0

Here is the result of the attachement running with TeeChart 5.

XSeries0
37965 45.1049118041992
37965.0034722222 44.8395805358887
37965.0069444444 44.7511405944824
37965.0104166667 44.4858207702637
37965.0138888889 44.3973808288574
37965.0173611111 43.9551696777344
37965.0208333333 43.8667297363281
37965.0243055556 43.6898498535156
37965.0277777778 43.5129585266113

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Dec 22, 2003 10:42 am

Yes, you're correct, I'm able to reproduce the problem here using the TeeChart Pro v5.05. This problem has been solved in the TeeChart Pro v6.0.

Josep Lluis Jorge
http://support.steema.com

Post Reply