熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

實例應用:用ASP生成二維餅圖

2013-11-13 09:46:12  來源: .NET編程 
 <%@ Language=VBScript %>
  <HTML>
  <HEAD>
  <META NAME=GENERATOR Content=Microsoft Visual Studio >
  </HEAD>
  <BODY>
  <OBJECT classid=clsid:ABCBAADBFFD
  id=MSChart VIEWASTEXT height= width=></OBJECT>
  <SCRIPT LANGUAGE=VBScript>
  <%
  Set objConn = ServerCreateObject(ADODBConnection)
  objconnConnectionString = DSN=AdvWorks
  objConnOpen
  Set objRS = ServerCreateObject(ADODBRecordset)
  objRSActiveConnection = objConn
  objRSCursorLocation =
  objRSOpen(select OrderDetailIDUnitPrice from Order_Details)
  i=
  ResponseWrite Const num = & objrsRecordCount & vbCr
  ResponseWrite Dim ID( & objrsRecordCount & ) & vbCr
  ResponseWrite Dim Details( & objrsRecordCount & ) & vbCr
  Do While Not objRSEOF
      ResponseWrite(ID( & i & )= & objRS() & & Chr())
      ResponseWrite(Details( & i & )= & objRS() & & Chr())
      i=i+
     objRSMoveNext
  Loop
  %>
  MSChartTitleText  = Example
  MSChartRowCount =
  MSChartColumnCount = num
  for i = to num
      MSChartColumn = i
      MSChartColumnLabel = ID(i)
  next
  MSChartchartType = 是二維餅圖擬合曲線我還不知道怎麼畫
  MSChartShowLegend = True
  MSChartChartData = Details
  </SCRIPT> 
  </BODY>
  </HTML>
From:http://tw.wingwit.com/Article/program/net/201311/11538.html
    推薦文章
    Copyright © 2005-2013 電腦知識網 Computer Knowledge   All rights reserved.