| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 940 人关注过本帖
标题:请问ASP如何制作柱形图
只看楼主 加入收藏
ywddong
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2022-3-12
结帖率:0
收藏
已结贴  问题点数:20 回复次数:1 
请问ASP如何制作柱形图
下面代码是想显示图表,但存在什么问题?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../../inetpub/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="97%" border="1" align="center" cellpadding="0" cellspacing="0"   bordercolor="#FFFFFF" bordercolorlight="#9CA6C6" bordercolordark="#CCE3FF">
  <tr bgcolor="#FF9933">
    <td height="10" colspan="6" class="word_white">
    &nbsp;当前位置:查询统计> 年销售额分析 &gt;&gt;&gt;</td>
  </tr>
      <form name="form2" method="post" action="">
  <tr>
    <td height="30" colspan="6">&nbsp;请选择要进行分析的年份:
      
        <input name="Submit" type="submit" class="btn_grey" value="确定分析"></td>
  </tr>
  </form>
  <tr align="center" bgcolor="#C8E3FF">
    <td height="14">
      <%
if 1>0 then
%>
      <object classid="clsid:3A2B370C-BA0A-11D1-B137-0000F8753F5D" name="chart" width="100%" height="300">
      
        <%'定义对象,该对象命名为chart%>
      </object>
      <%
counts=6
for i=1 to counts               '循环从1循环到counts
%>
<script language="javascript">


function charts(type){
if (type=="line"){
    chart.chartType=3; }     //chartType是对象chart的属性:表示图形类型
if (type=="pillar" ){
    chart.chartType=1;
}  


chart.ColumnCount=1;    //ColumnCount是对象chart的属性:表示设置与图表关联的当前数据网格中的列数
chart.Title="年销售额分析表";   //图表标题
chart.rowcount=<%=counts%>;             //rowcount属性:数据行个数
chart.row=<%=i%>;                       //row属性:当前数据行
chart.rowlabel="1月份"; //rowlabel属性:返回/设置一个数据标签,该标签用来标识图表中当前数据点。横坐标值
          //Data属性:当前数据点的值。纵坐标值
chart.Footnote="注:纵坐标为销售额,单位为(元) ;空缺的月份没有销售额"
}

</script>
<%
 
  next            
%>
&nbsp;</td>
  </tr>
</table>
    </td>
  </tr>
</table>
<table width="97%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="60" align="center">
  <form name="form1" method="post" action="">   
    <input name="pillar" type="button" class="btn_grey" onClick="charts('pillar')" value="柱状图分析">
    <input name="line" type="button" class="btn_grey" onClick="charts('line')" value="线性图分析">
    </form>    </td>
  </tr>
</table>
 <% end if  %>

</body>
</html>
搜索更多相关主题的帖子: chart type name 属性 分析 
2022-03-12 09:29
apull
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:三体星系
等 级:版主
威 望:216
帖 子:1479
专家分:9055
注 册:2010-3-16
收藏
得分:20 
用echart不香吗
2022-03-12 12:37
快速回复:请问ASP如何制作柱形图
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017596 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved