当前位置: 首页 > news >正文

OWC绘图控件研究(2)

在前台中提交给OWC一定规则的数据后,可通过脚本生成数据图表,多话不说,前台代码如下:

<% ... @ControlLanguage="C#"AutoEventWireup="true"CodeFile="ViewImage.ascx.cs"Inherits="web_CarsManage_Controls_ViewImage" %>

< script language ="javascript" > ...
<!--
functionIni()
...{
//
//
document.form1.all["tbFrom"].readOnly=true;
//
document.form1.all["tbTo"].readOnly=true;

varchart=document.getElementById("Chart");//newActiveXObject("OWC11.ChartSpace.11");
varc=chart.Constants;
if(chart==null)
...{
alert(
"您没有安装Office!");
}

chart.Clear();
varm_Chart=chart.Charts.Add(0);
//m_Chart.PlotArea.Interior.SetOneColorGradient(c.chGradientVariantStart,c.chGradientVariantStart,0.15,"Silver")

m_Chart.HasLegend
=true

//alert('<%=driverList.Count%>');
varj=<%=driverList.Count%>
for(vari=0;i<j;i++)
...{
alert(i.toString());
}

m_Chart.HasTitle
=true
m_Chart.Title.Caption
="油耗量统计分析";
m_Chart.Axes(
0).HasTitle=true;
m_Chart.Axes(
0).Title.Caption="月份";
m_Chart.Axes(
1).HasTitle=true;
m_Chart.Axes(
1).Title.Caption="油耗量";

m_Chart.type
=0;

varaCats=["中国","美国","澳大利亚"];//["1","2","3","4","5","6","7","8","9","10","11","12"];
varaVals=[100,120,128]//<%=OilTotal.ToString()%>;//<%=OilTotal%>;;

varoSer=m_Chart.SeriesCollection.Add(0);
oSer.SetData(c.chDimSeriesNames,
-1,"标准油耗");
oSer.SetData(c.chDimCategories,
-1,aCats);
oSer.SetData(c.chDimValues,
-1,aVals);

//varoSer1=m_Chart.SeriesCollection.Add(0);
varaVals1=[123,124,145];//<%=OilTotal%>;//[100,120,128];
varoser=m_Chart.SeriesCollection.Add(1);
oser.SetData(c.chDimSeriesNames,
-1,"图例1");
oser.SetData(c.chDimCategories,
-1,aCats);
oser.SetData(c.chDimValues,
-1,aVals1);

chart.AllowPropertyToolbox
=true;
chart.DisplayToolbar
=true;

}


-->
</ script >

< body onload ="javascript:Ini()" >
< table width ="100%" >
< tr >
< td >
< table width ="100%" >
< tr >
< td style ="width:250px;text-align:right" > 年份: </ td >
< td style ="width:85px" >
< asp:DropDownList ID ="ddlYear" runat ="server" Width ="130px" >
</ asp:DropDownList >
</ td >
< td style ="width:36px;text-align:right" align ="right" > 车号: </ td >
< td style ="width:100px" >
< asp:DropDownList ID ="ddlCnumber" runat ="server" Width ="130px" >
< asp:ListItem > --请选择车号 </ asp:ListItem >
</ asp:DropDownList >
</ td >
</ tr >
< tr >
< td style ="width:250px;height:116px;" align ="right" > 驾驶员: </ td >
< td style ="width:85px;height:116px;" >
< asp:ListBox ID ="lstName" runat ="server" Height ="130px" Width ="130px" ></ asp:ListBox >
</ td >
< td style ="width:36px;height:116px;text-align:center;" align ="right" >
< table style ="width:1px" >
< tr >
< td style ="width:21px" >
< asp:Button ID ="btnSelectAll" runat ="server" OnClick ="btnSelectAll_Click" Text =">>" CssClass ="button_skin"
Width
="30px" /></ td >
</ tr >
< tr >
< td style ="width:21px" >
< asp:Button ID ="btnSelectSingle" runat ="server" OnClick ="btnSelectSingle_Click" Text =">" CssClass ="button_skin"
Width
="30px" /></ td >
</ tr >
< tr >
< td style ="width:21px" >
< asp:Button ID ="btnRemoveSingle" runat ="server" OnClick ="btnRemoveSingle_Click" Text ="<" CssClass ="button_skin"
Width
="30px" /></ td >
</ tr >
< tr >
< td style ="width:21px;height:26px" >
< asp:Button ID ="btnRemoveAll" runat ="server" OnClick ="btnRemoveAll_Click" Text ="<<" CssClass ="button_skin"
Width
="30px" /></ td >
</ tr >
</ table >
</ td >
< td style ="width:380px;height:116px;" >< asp:ListBox ID ="lstSelectName" runat ="server" Height ="128px" Width ="130px" ></ asp:ListBox ></ td >
</ tr >
< tr >
< td align ="center" colspan ="4" >
< asp:Button ID ="btnOK" runat ="server" OnClick ="btnOK_Click" Text ="统计分析" CssClass ="button_skin" />
</ td >
</ tr >
</ table >
</ td >
</ tr >
< tr >
< td colspan ="1" rowspan ="3" style ="width:730px;text-align:center" >
< asp:Image ID ="Image1" runat ="server" Visible ="false" />< object id ="Chart" name ="Chart" codebase ="http://www.smnpc.cn/bin/OWC11.DLL#version=11,0,6555,0"
classid
="clsid:0002E55D-0000-0000-C000-000000000046" progid ="OWC11.ChartSpace.11" ></ object ></ td >
</ tr >
< tr >
</ tr >
< tr >
</ tr >
</ table >
< input id ="Button1" type ="button" value ="button" onclick ="returnButton1_onclick()" />
</ body >

相关文章:

  • K8S pod异常状态处理
  • UPS FedEx DHL TNT
  • k8s 安装helm2 和 helm3
  • Happy Feet
  • Cython的基本用法
  • 计算字段 VS 视图
  • k8s secret 详细理解和使用
  • k8s中的kubeflow1.02安装过程记录
  • 在struts中html:select 标签的disabled属性中使用java代码
  • k8s 开发流程
  • 用Linux搞定了Windows中无法使用也无法修复的MP3!
  • centos7 k8s安装部署nvidia-docker2 排坑记录
  • Runtime.exec系列方法与ProcessBuilder类
  • kubeflow Pods stuck in Pending state
  • String的split方法的使用
  • C++入门教程(10):for 语句
  • export和import的用法总结
  • isset在php5.6-和php7.0+的一些差异
  • js 实现textarea输入字数提示
  • k个最大的数及变种小结
  • Spring Cloud(3) - 服务治理: Spring Cloud Eureka
  • storm drpc实例
  • Transformer-XL: Unleashing the Potential of Attention Models
  • windows-nginx-https-本地配置
  • 第2章 网络文档
  • 利用阿里云 OSS 搭建私有 Docker 仓库
  • 你不可错过的前端面试题(一)
  • 微信开放平台全网发布【失败】的几点排查方法
  • 移动端 h5开发相关内容总结(三)
  • 湖北分布式智能数据采集方法有哪些?
  • ​LeetCode解法汇总1410. HTML 实体解析器
  • ​LeetCode解法汇总2808. 使循环数组所有元素相等的最少秒数
  • ​ssh免密码登录设置及问题总结
  • # include “ “ 和 # include < >两者的区别
  • #define用法
  • (ISPRS,2023)深度语义-视觉对齐用于zero-shot遥感图像场景分类
  • (Note)C++中的继承方式
  • (Redis使用系列) Springboot 实现Redis消息的订阅与分布 四
  • (免费领源码)Java#ssm#MySQL 创意商城03663-计算机毕业设计项目选题推荐
  • (三维重建学习)已有位姿放入colmap和3D Gaussian Splatting训练
  • (转) SpringBoot:使用spring-boot-devtools进行热部署以及不生效的问题解决
  • (转)3D模板阴影原理
  • (转)LINQ之路
  • ./configure,make,make install的作用(转)
  • .360、.halo勒索病毒的最新威胁:如何恢复您的数据?
  • .NET Standard 的管理策略
  • .NET Windows:删除文件夹后立即判断,有可能依然存在
  • .NET使用HttpClient以multipart/form-data形式post上传文件及其相关参数
  • @Bean注解详解
  • [ 数据结构 - C++]红黑树RBTree
  • [AIR] NativeExtension在IOS下的开发实例 --- IOS项目的创建 (一)
  • [AX]AX2012 SSRS报表Drill through action
  • [BUAA软工]第一次博客作业---阅读《构建之法》
  • [BZOJ1060][ZJOI2007]时态同步 树形dp
  • [C#基础]说说lock到底锁谁?