%@ LANGUAGE="VBScript" %> <% start_time = Time %>
<% ' ' Do heavy duty database extraction here ' Set RS1 = Connection.Execute(SQLStmt1) Do While Not RS1.EoF ' ' Get the curves ' ichip=CInt(RS1("hpos")) String(ichip)=CInt(RS1("string")) String_chip(ichip)=CInt(RS1("stringchip")) inp_chip(npoints_chip(ichip),ichip)=CDbl(RS1("inp")) out_chip(npoints_chip(ichip),ichip)=CDbl(RS1("out")) npoints_chip(ichip)=npoints_chip(ichip)+1 RS1.MoveNext Loop For i=0 To 15 npoints_chip(i)=npoints_chip(i)-1 Next %> <% start_time = Time %> <% ' ' Prepare plot ' seed=-(second(now())+60*minute(now())+3600*hour(now())+3600*24*day(now())) filename="sigcurv" & cstr(int(100000.*rnd(seed))) & ".jpg" filename_full=ph_image_directory & filename %> <% Dim Chart Dim Color(8) Color(0) = vbRed Color(1) = vbBlue Color(2) = vbYellow Color(3) = vbGreen Color(4)= vbMagenta Color(5)= vbCyan Color(6)= vbWhite Color(7)= vbBlack rem ********************************************************************** rem * Instantiate the Chart component rem ********************************************************************** Set Chart = Server.CreateObject ("ASPChart.Chart") rem ********************************************************************** rem * Create x Array rem ********************************************************************** For i=0 To 15 If npoints_chip(i)=>0 Then Chart.AddSeries 5 Chart.SeriesTitle = "Chip " & Cstr(i) Chart.LineWidth = 1 Chart.Stairs = False Chart.SeriesInLegend = true icol=i If icol>7 Then icol=icol-8 End If For ipoints=0 To npoints_chip(i) Chart.AddXY inp_chip(ipoints,i),out_chip(ipoints,i),"",Color(icol) Next End If Next For i=0 To 15 If npoints_chip(i)=>0 Then Chart.AddSeries 6 Chart.SeriesTitle = "Chip " & Cstr(i) Chart.LineWidth = 1 Chart.Stairs = False Chart.SeriesInLegend = False icol=i If icol>7 Then icol=icol-8 End If For ipoints=0 To npoints_chip(i) Chart.AddXY inp_chip(ipoints,i),out_chip(ipoints,i),"",Color(icol) Next End If Next rem ********************************************************************** rem * Add and format the title rem ********************************************************************** Chart.ChartTitleFont.Size = 16 Chart.ChartTitleFont.Name = "Arial" Chart.ChartTitleFont.Italic = true Chart.ChartTitleFont.Bold = true Chart.View3D = false Chart.LegendVisible = false Chart.LegendStyle = cSeries Chart.AxisGridLines = true Chart.Frame = false Chart.BottomAxisIncrement = 50. Chart.LeftAxisIncrement = 50. rem ********************************************************************** rem * Remove the OuterBevel, add a gradient fill to chart panel rem ********************************************************************** Chart.BevelOuter = 0 rem Chart.GradientVisible = true rem Chart.GradientStartColor = vbWhite rem Chart.GradientEndColor = vbYellow Chart.PanelColor = Color(6) rem ********************************************************************** rem * Set the Width and Height of the image rem ********************************************************************** Chart.Height = 400 Chart.Width = 600 Chart.HorizAxisMin = -100 Chart.HorizAxisMax = 4000 Chart.VertAxisMin = -100. Chart.VertAxisMax = 2500. Chart.AddAxisLabel 2 , "Input Voltage [mV]" Chart.AddAxisLabel 1 , "Output Voltage [mV]" rem ********************************************************************** rem * Set the filename, save the image and write the image tag rem ********************************************************************** Chart.FileName = filename_full Chart.SaveChart line=" | Both ROWID's are empty ! <%End If%> |