<%
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 **********************************************************************
ise=-1
icol=-1
cmax =-10000
do while not Scv.EOF
If Cint(Scv("Sensor"))=ise Then
dcol=CDbl(Scv("col"))
dcap=CDbl(Scv("Capacitance"))-avg_cap(ise)
' dcap=CDbl(Scv("Capacitance"))
If cmaxise Then
If ise>0 Then
' finish work for previous sensor
End If
If itest<>10000 Then
Chart.AddSeries 5
Chart.LineWidth = 1
Chart.Stairs = true
icol=icol+1
If icol>7 Then
icol=0
End If
End If
ise=itest
End If
loop
rem **********************************************************************
rem * Add and format the title
rem **********************************************************************
Chart.ChartTitleAdd ("Vb=" & Cstr(precision(maxba,1)) & " [V]")
Chart.ChartTitleFont.Size = 18
Chart.ChartTitleFont.Name = "Times New Roman"
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 = nchip
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 = 800
Chart.Width = 600
Chart.HorizAxisMax = nchip*maxbp
Chart.HorizAxisMin = 0.
Chart.VertAxisMax = +10
Chart.VertAxisMin = -10
Chart.AddAxisLabel 1 , "Capacitance [pF]"
Chart.AddAxisLabel 2 , Cstr(nchip) & "*bonding_pattern+pad"
rem **********************************************************************
rem * Set the filename, save the image and write the image tag
rem **********************************************************************
Chart.FileName = filename_full
Chart.SaveChart
line="
"
Response.Write (line)
rem **********************************************************************
rem * Destroy the object
rem **********************************************************************
Set Chart = nothing
' Database is not needed anymore !
Connection.Close
%>