Controls | charts | Explain the use of OWC (Office Web components) controls in ASP makes it easy to implement various chart functions, such as pie, clustered column, line, and so on.
In the following code I give a detailed list of pie, clustered column chart, line chart of the use of the method. OWC for more features, the properties can participate in the Msowcvba.chm Help file (you'll find it yourself in the Office 2000 folder).
testowc.asp
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title>asp OWC Control in the implementation of chart features detailed </title>
<body>
<%
' The following test is a product sales chart
MX1 = "A product, b product, c product, D product" ' Data item array group (give the test data, the actual use of the time from the database read "," separated)
MX2 = "50,60,20,80" Data Item value array
Datestr = "2005-3-24,2005-3-25,2005-3-26,2005-3-27,2005-3-28" ' Date
Sqarxlstr = "50,100,20,80,89" ' a product sales from 2005-3-24 to 2005-3-28
Sqarxlstr = Sqarxlstr & "," & "40,60,20,90,70" ' B products sales from 2005-3-24 to 2005-3-28
Sqarxlstr = Sqarxlstr & "," & "20,50,55,25,60" ' C products sales from 2005-3-24 to 2005-3-28
Sqarxlstr = Sqarxlstr & "," & "80,20,75,58,100" ' d products sales from 2005-3-24 to 2005-3-28
%>
<br>
<center><object id= "ChartSpace1" classid= "clsid:0002e500-0000-0000-c000-000000000046" style= "width:95%"; height:400 "></object></center>
<br>
<center><object id= "ChartSpace2" classid= "clsid:0002e500-0000-0000-c000-000000000046" style= "width:95%"; height:400 "></object></center>
<br>
<center><object id= "ChartSpace3" classid= "clsid:0002e500-0000-0000-c000-000000000046" style= "width:95%"; height:400 "></object></center>
<script language= "VBScript" >
Sub Window_onload ()
'------------------pie chart-------------------------------------------------------------