<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="conn.asp"-->
<html>
<head>
<title>TMS-Taxi Management System Version 1.0</title>
<link rel="stylesheet" type="text/css" href="web2.css" />
</head>
<body>
<%
dim car_id, men_name,car_number, car_color, car_brand
dim rs
set rs = server.createobject("adodb.recordset"
rs.open "select * from car_inf", cn
%>
<div id="homeFlashApp">
<img src="logo.png" />
<img src="background.gif" />
<div id="liebiao"><a href="wl\complain_view.asp">投诉管理</a> | <a href="tyj\accident_view.asp">事故管理</a> | <a href="carmanagement.asp">人车管理</a> | <a href="ly\shuifeiguanli.asp">税费管理</a> | 统计汇总</div>
</div>
<div id="homepageSubWrapper">
<img src="hp_hr.gif" width="754" height="1" />
<div id="mima">
<%
'下面测试的是一个产品销量图
MX1 = "捷达,奥迪,桑塔纳,宝马" '数据项目名数组(给出测试数据,实际用的时候从数据库读取用","分隔)
MX2 = "50,60,20,80" '数据项目值数组
Datestr = "2005-3-24,2005-3-25,2005-3-26,2005-3-27,2005-3-28" '日期
SQARXLstr = "50,100,20,80,89" 'A产品2005-3-24 至 2005-3-28的销量
SQARXLstr = SQARXLstr & "," & "40,60,20,90,70" 'B产品2005-3-24 至 2005-3-28的销量
SQARXLstr = SQARXLstr & "," & "20,50,55,25,60" 'C产品2005-3-24 至 2005-3-28的销量
SQARXLstr = SQARXLstr & "," & "80,20,75,58,100" 'D产品2005-3-24 至 2005-3-28的销量
%>
<br />
<center><object id="ChartSpace1" classid="CLSID:0002E500-0000-0000-C000-000000000046" style="width:95%;height:400"></object></center>
<script language="vbscript">
Sub Window_OnLoad()
'------------------饼图-------------------------------------------------------------
'为数据赋值
categories = split("<%=MX1%>",","
'数据项目名数组
values = split("<%=MX2%>",","
'数据项目值数组
Set cht = ChartSpace1.Charts.Add '添加一个图标对象
Set c = ChartSpace1.Constants '返回一个对象,此对象允许脚本用户使用已命名的常量。
cht.Type = c.chChartTypePie '设置图表类型为饼图
'-------设置图表标题----------------------------------------
ChartSpace1.HasChartSpaceTitle = True '指定图表工作区中包含标题
ChartSpace1.ChartSpaceTitle.Caption = "车辆品牌统计图" '设置图表工作区标题内容
'有关字体的设置
ChartSpace1.ChartSpaceTitle.Font.Bold = false '设置图表工作区标题内容是否粗体
ChartSpace1.ChartSpaceTitle.Font.Color = "black" '设置图表工作区标题的颜色
ChartSpace1.ChartSpaceTitle.Font.Italic = False '设置图表工作区标题是否为斜体
ChartSpace1.ChartSpaceTitle.Font.Name = "宋体" '设置图表工作区标题内容的字体
ChartSpace1.ChartSpaceTitle.Font.Size = 10 '设置图表工作区标题内容的大小(单位:磅)
ChartSpace1.ChartSpaceTitle.Font.Underline = c.owcUnderlineStyleSingle '设置下划线属性
'-------设置图例--------------------------------------------
cht.HasLegend = True '指定图表工作区中含有图例
cht.Legend.Font.Size = 9 '其他有关字体项的设置参见设置图表标题部分
cht.Legend.Position = c.chLegendPositionRight '设置图例对其方式
cht.SetData c.chDimCategories, c.chDataLiteral, categories
cht.SeriesCollection(0).SetData c.chDimvalues, c.chDataLiteral, values
Set dl = cht.SeriesCollection(0).DataLabelsCollection.Add '添加图例的数据标记
dl.Hasvalue = False
dl.HasPercentage = True
dl.Font.Size = 11
'------------------饼图(结束)------------------------------------------------
End Sub
</script>
</div>
<img src="renche_bg.png" />
<object classid="clsid
27CDB6E-AE6D-11cf-96B8-444553540000" width="140" height="60">
<param name="movie" value="timer.swf" />
<param name="quality" value="high" />
<embed src="timer.swf" width="140" height="60" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
</div>
<div id="hpFooterBar"><img src="bottom_bar.gif" width="756" height="34" alt="" />
</div>
</body>
</html>
其中 MX2 = "50,60,20,80" '数据项目值数组
MX2必须要数组 怎样才能查到品牌为宝马,捷达,桑塔纳的数值呢?