User (Legacy) Posted November 18, 2000 Report Share Posted November 18, 2000 Hello I'm using ChartFX IE to plot a value vs time. I'm retrieving the data using ADO from an SQL Server.. Here's the code I'm using right now: Dim Chart, rsChart Set rsChart = CreateObject("ADODB.Recordset") strSQL = "select convert(datetime,[Time]), [Val] " & _ "from tblLabValues " & _ "order by [RecordNo] " rsChart.Open strSQL, Application("dbcCustom") Set Chart = CreateObject("ChartFX.WebServer") Chart.Axis(AXIS_Y).ForceZero = False Chart.Axis(AXIS_Y).AutoScale = True Chart.Axis(AXIS_Y).ResetScale Chart.Gallery = LINES Chart.LeftGap = 51 Chart.RightGap = 11 Chart.BottomGap = 21 Chart.Axis(AXIS_Y).Grid = True Chart.Axis(AXIS_X).Grid = True Chart.Axis(AXIS_Y).GridStyle = 2 Chart.Axis(AXIS_X).Format = AF_TIME The chart plots, but all the X-axis values show '01/01/1900'. The date part is reasonable, since my SQL Query returns something like (running the same SQL statement from a SQL debugger): Time Val --------------------------- --------------------- 1900-01-01 10:45:13.000 4.9000 1900-01-01 10:45:13.000 4.9000 1900-01-01 10:45:14.000 4.9000 1900-01-01 10:45:43.000 4.8600 1900-01-01 10:45:46.000 4.8600 1900-01-01 10:45:48.000 4.8900 1900-01-01 10:45:49.000 4.9000 1900-01-01 10:45:50.000 4.8600 1900-01-01 10:46:02.000 4.8800 I've tried changing the format of the axis to "XHH:mm", "DHH:mm", even tried "Ddd-MMM-yy" (which would make no sense for my chart, but I tried it anyway). ChartFX ignored all my efforts... I have a feeling it may be related to the layout of the data coming from my SQL Server... is there anything I need to consider? Any help would be appreciated Alexis M < a l e x _ m 7 4 at h o t m a i l dot c o m > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.