export data with datetime axis
Posted: 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
------------------------------------------
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
------------------------------------------