<%
function table2(total,table_x,table_y,all_width,all_height,line_no)
'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)
'纯ASP代码生成图表函数2——折线图
'@version:2.0
'@brief: 增加负数支持,并修正小数不能正常显示的BUG, 增加部分注释
'@date: 10/29/2010
'@author: 李玉宝(yubaolee/.cpp/anglecloudy)
'@contact BaiDuHI: http://hi.baidu.com/anglecloudy
' javaeye:http://dotcpp.iteye.com
' cnblogs: http://www.cnblogs.com/dotcpp
'@remarks:
' 数组情况分布:【!ASP中dim[m][n],有[m+1]*[n+1]个元素!】
' total[0][0]未使用 第一行为线条信息,第一列为X轴显示的内容
' ________________________________
' | NULL| 线条的颜色等信息 |
' -------------------------------|
' | x | |
' | 轴 | 曲线内容 |
' | | |
' --------------------------------
'
'
'作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com
'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨
'版本1.0 2003-8-11
'非常感谢您使用这个函数,请您使用和转载时保留版权信息,这是对作者工作的最好的尊重。
line_color="#69f"
left_width=70
total_no=ubound(total,1)
temp1=0 'save the maximum value
minvalue = 0 'save the minimum value
for i=1 to total_no
for j=1 to line_no
if temp1<int(total(i,j)) then temp1=int(total(i,j))
if minvalue > int(total(i,j)) then minvalue = int(total(i,j))
next
next
'caculate the y axis max value, and save it to temp3
if temp1>9 then
temp2=mid(cstr(temp1),2,1)
if temp2>5 then
temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)
else
temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)
end if
else
if temp1>4 then temp3=10 else temp3=5
end if
'if the minimum value is minus, you should caculate the y axis min value, and save it to mintemp3
mintemp3 = 0
if minvalue<0 then
minvalue = -minvalue
if minvalue > 9 then
mintemp2 = mid(cstr(minvalue),2,1)
if(mintemp2 > 5) then
mintemp3=(int(minvalue/(10^(len(cstr(minvalue))-1)))+1)*10^(len(cstr(minvalue))-1)
else
mintemp3=(int(minvalue/(10^(len(cstr(minvalue))-1)))+0.5)*10^(len(cstr(minvalue))-1)
end if
else
if minvalue> 4 then mintemp3= 10 else mintemp3=5
end if
minvalue = -minvalue
mintemp3 = -mintemp3
end if
temp4=temp3
response.write "<v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&table_x+left_width&"px;top:"&table_y&"px;width:"&all_width&"px;height:"&all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect>"
for i=0 to all_height-1 step all_height/20
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width+length&"px,"&table_y+all_height-length-i&"px' to='"&table_x+all_width+left_width&"px,"&table_y+all_height-length-i&"px' strokecolor='"&line_color&"'/>"
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+(left_width-15)&"px,"&table_y+i&"px' to='"&table_x+left_width&"px,"&table_y+i&"px'/>"
response.write ""
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x&"px;top:"&table_y+i&"px;width:"&left_width&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>"&temp4&"</td></tr></table></v:textbox></v:shape>"
temp4=temp4-(temp3-mintemp3)/20 'the per step of y axis is (temp3-mintemp3)/20
next
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width&"px,"&table_y+all_height&"px' to='"&table_x+all_width+left_width&"px,"&table_y+all_height&"px'/>"
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width&"px,"&table_y&"px' to='"&table_x+left_width&"px,"&table_y+all_height&"px'/>"
dim line_code
redim line_code(line_no,5)
for i=1 to line_no
line_temp=split(total(0,i),",")
line_code(i,1)=line_temp(0)
line_code(i,2)=line_temp(1)
line_code(i,3)=line_temp(2)
line_code(i,4)=line_temp(3)
line_code(i,5)=line_temp(4)
next
for j=1 to line_no
for i=1 to total_no-2
x1=table_x+left_width+all_width*(i-1)/total_no
y1=table_y+(temp3-total(i,j))*(all_height/(temp3-mintemp3))
x2=table_x+left_width+all_width*i/total_no
y2=table_y+(temp3-total(i+1,j))*(all_height/(temp3-mintemp3))
'draw specific lines and illustrating of every color meaning
response.write "<v:line id=""_x0000_s1025"" alt="""" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="""&x1&"px,"&y1&"px"" to="""&x2&"px,"&y2&"px"" coordsize=""21600,21600"" strokecolor="""&line_code(j,1)&""" strokeweight="""&line_code(j,2)&""">"
' check line type
select case line_code(j,3)
case 1
case 2
response.write "<v:stroke dashstyle='1 1'/>"
case 3
response.write "<v:stroke dashstyle='dash'/>"
case 4
response.write "<v:stroke dashstyle='dashDot'/>"
case 5
response.write "<v:stroke dashstyle='longDash'/>"
case 6
response.write "<v:stroke dashstyle='longDashDot'/>"
case 7
response.write "<v:stroke dashstyle='longDashDotDot'/>"
case else
end select
response.write "</v:line>"&CHR(13)
select case line_code(j,4)
case 1
case 2
response.write "<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&x1-2&"px;top:"&y1-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
case 3
response.write "<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&x1-2&"px;top:"&y1-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
end select
next
select case line_code(j,4)
case 1
case 2
response.write "<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&x2-2&"px;top:"&y2-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
case 3
response.write "<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&x2-2&"px;top:"&y2-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
end select
next
'show the value of x axis
for i=1 to total_no
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width+all_width*(i-1)/total_no&"px,"&table_y+all_height&"px' to='"&table_x+left_width+all_width*(i-1)/total_no&"px,"&table_y+all_height+15&"px'/>"
response.write ""
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+left_width+all_width*(i-1)/total_no&"px;top:"&table_y+all_height&"px;width:"&all_width/total_no&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&total(i,0)&"</td></tr></table></v:textbox></v:shape>"
next
tb_height=30
response.write "<v:rect id='_x0000_s1025' style='position:absolute;left:"&table_x+all_width+20&"px;top:"&table_y&"px;width:100px;height:"&line_no*tb_height+20&"px;z-index:1'/>"
for i=1 to line_no
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+all_width+25&"px;top:"&table_y+10+(i-1)*tb_height&"px;width:60px;height:"&tb_height&"px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&line_code(i,5)&"</td></tr></table></v:textbox></v:shape>"
response.write "<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&table_x+all_width+80&"px;top:"&table_y+10+(i-1)*tb_height+4&"px;width:30px;height:20px;z-index:1' fillcolor='"&line_code(i,1)&"'><v:fill color2='"&line_code(i,1)&"' rotate='t' focus='100%' type='gradient'/></v:rect>"
next
end function
%>
调用:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>
TD { FONT-SIZE: 9pt}
</style></head>
<body topmargin=5 leftmargin=0 scroll=AUTO>
<script language=javascript>
//=============调用方法=====================
var nameArray = new Array();
nameArray[0]="中国经营报"
nameArray[1]="招聘网"
nameArray[2]="51Job"
nameArray[3]="新民晚报"
nameArray[4]="新闻晚报"
nameArray[5]="南方周末"
nameArray[6]="羊城晚报"
var dataArray1 = new Array()
dataArray1[0]="#FF0000,1.5,1,2,公司1"//参数1线条的颜色,参数2线条的宽度,参数3线条的类型,参数4转折点的类型,参数5线条名称
dataArray1[1]=200.3
dataArray1[2]=40.33
dataArray1[3]=-200
dataArray1[4]=-600
dataArray1[5]=1222
dataArray1[6]=413
dataArray1[7]=800
var dataArray2 = new Array()
dataArray2[0]="#0000FF,1,2,3,公司2"
dataArray2[1]=-200
dataArray2[2]=500
dataArray2[3]=1040
dataArray2[4]=1600
dataArray2[5]=522
dataArray2[6]=813
dataArray2[7]=980
var dataArray3 = new Array()
dataArray3[0]="#004D00,1,1,3,公司3"
dataArray3[1]=300.33
dataArray3[2]=890
dataArray3[3]=1240
dataArray3[4]=40.25
dataArray3[5]=722
dataArray3[6]=833
dataArray3[7]=1280
var total = new Array(nameArray,dataArray1,dataArray2,dataArray3)
table2(total,100,90,600,250,3);
</script>
</body>
</html>
分享到:
相关推荐
function table2(total,table_x,table_y,all_width,all_height,line_no) ‘参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数) ‘纯ASP代码生成图表函数2——折线图 ‘作者:龚鸣(Passwordgm...
"Comsol完美吸收器:可见光薄膜与金环宽带吸收器的二维斜入射研究",Comsol完美吸收器。 包含可见光薄膜完美吸收器,涉及二维斜入射。 包含金环宽带完美吸收器。 ,Comsol完美吸收器; 可见光薄膜完美吸收器; 二维斜入射; 金环宽带完美吸收器,"Comsol二维斜入射完美吸收器:可见光薄膜与金环宽带吸收技术"
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
,西门子S7-200smart型PLC使用profinet通讯控制G120变频器程序, 可以实现速度设定与读取,启停和故障复位等功能。
免费JAVA毕业设计 2024成品源码+论文+数据库+启动教程 启动教程:https://www.bilibili.com/video/BV1SzbFe7EGZ 项目讲解视频:https://www.bilibili.com/video/BV1Tb421n72S 二次开发教程:https://www.bilibili.com/video/BV18i421i7Dx
,大众斯柯达 免玻璃车道保持新方案
基于PFC5.0的岩石循环加卸载试验的3D实现技术,PFC5.0 3D实现岩石的循环加卸载试验, ,PFC5.0; 3D岩石; 循环加卸载试验; 岩石循环; 岩石加卸载模拟,"PFC5.0三维岩石循环加卸载试验研究"
nodejs010-nodejs-boom-0.4.2-2.el6.centos.alt.noarch.rpm
小学元旦晚会PPT 模版
STEP7-MicroWIN-SMART-V3.0测试版(2025.02最新)安装包-链接地址
内容概要:卷积神经网络(CNN)是一种特殊的神经网络模型,尤其适用于处理图像类的任务,如检测任务、分类与检索、超分辨率重构、医学任务、无人驾驶、人脸识别等。与传统神经网络输入一组向量值不同,CNN能够接受更为复杂的三维输入(深度、高度、宽度),从而有效地降低输入参数量并提高图像处理效率。文中介绍了卷积操作的基本原理及其在图像中的运用,例如通过设置合适的卷积核大小、步幅和零填充等手段,控制特征图的数量和尺度,进而达到优化网络性能的目的。此外还提及了卷积参数共享的概念以及池化层的作用。经典案例包括了AlexNet、VGG网路和残差网络的设计思想和结构特性,尤其是残差网络解决了非常深网络难以训练的问题,并提升了模型的表现力。感受野的介绍则强调了深层网络中的局部感知的重要性。 适合人群:从事计算机视觉领域的研究人员和技术人员,特别是关注图像识别和高级图像处理的研究人员或开发者。 使用场景及目标:①理解并掌握CNN的基本组成单元,如卷积层、池化层的工作机制;②深入探讨经典CNN架构背后的思路及其应用场景,帮助读者提升模型构建能力,以便更好地应用于实际项目中。
nodejs010-1.2-29.el6.centos.alt.x86_64.rpm
COMSOL注浆技术:浆液扩散模型及其应用研究,comsol注浆,浆液扩散模型 ,comsol注浆; 浆液扩散模型,"Comsol注浆技术下的浆液扩散模型研究"
"Modbus全功能调试工具:RTU、ASCII支持,主站调试必备,界面简洁易操作,数据记录与转换,串口助手功能齐备,自动应答及批量连续发送功能强大,学习测试必备利器",MobbusRTU ModbusASCII Modbus调试工具Modbus主站调试工具ModbusMaster支持所有Modbus设备调试; 功能强大,是学习测试的必备工具; 1.界面简洁 2.数据记录功能 3.串口助手功能 4.数据转功能 5.自动应答功能 5.批量发送功能 6.连续发送功能 ,ModbusRTU; ModbusASCII; 调试工具; 主站调试工具; ModbusMaster; 全部设备调试; 功能强大; 界面简洁; 数据记录; 串口助手; 数据转换; 自动应答; 批量发送; 连续发送。,"多功能Modbus调试工具:支持RTU/ASCII,主站必备,功能全面,操作简洁"
一个使用 C++ 结合 DeepSeek 模型进行文本相似度计算的源码。该实例会接收两段文本,借助 DeepSeek 模型提取文本特征,然后通过余弦相似度来衡量两段文本的相似程度。
内容概要:本文详细介绍了传统RNN网络存在的问题及其局限性,进而引出了Transformer模型的核心优势及其结构原理。传统RNN由于串行计算和无法有效处理长距离依赖等问题限制了其应用效果,尤其在自然语言处理领域表现不佳。相比之下,Transformer通过引入自注意力机制(self-attention mechanism)和平行化的架构解决了这些问题。自注意力机制允许模型在同一时间处理完整的输入序列,在计算每个位置的表征时不仅考虑到该位置的元素也综合了其他所有位置的相关度。此外,文章还具体讲解了多头注意力机制(multi-head attention),以及为何引入多头能够捕获更为丰富的语义特征;位置编码(positional encoding)的作用是为了赋予模型区分相同字符在不同顺序组合的意义能力;并在末尾提到了BERT这一基于Transformer的预训练模型及其两种主要训练方式——掩码语言模型(masked language model)和下一个句子预测(next sentence prediction)。总体而言,本文揭示了Transformers架构相对于以往序列建模方法的优势所在。 适合人群:对深度学习尤其是自然语言处理技术有一定基础的理解的研究人员和技术爱好者。 使用场景及目标:帮助读者深入理解为何传统递归神经网络受限于自身的设计无法很好地应对复杂的NLP任务,如翻译或文本摘要,并展示了Transformer是如何克服这些问题的;同时也旨在让有兴趣探索最先进预训练模型如BERT背后逻辑的人群受益。 阅读建议:鉴于本文涉及到大量数学概念与公式推导,请确保自己拥有坚实的机器学习基础知识并且愿意投入足够的时间消化吸收这些新信息。建议配合代码实现一起学习,在实践中加深对各个组件作用的认知。
混合励磁爪极电机在Maxwell中的仿真分析与优化研究,爪极电机 (混合励磁爪极电机) maxwell ,核心关键词:爪极电机; 混合励磁; 爪极电机Maxwell;,混合励磁爪极电机在Maxwell中的仿真研究
内容概要:本文介绍了DeepSeek模型在不同平台上部署的方法。首先阐述了基于Ollama的本地部署,包括Ollama的安装、模型拉取以及交互模式的使用。接着讲解了DeepSeek在移动设备(iOS和Android)上的部署细节:iPhone需要通过Safari安装快捷指令,配置API Key并通过快捷指令测试运行;Android则借助Termux安装必要组件,并手动搭建Ollama环境以加载和测试模型。最后详细叙述了基于Open WebUI部署的方式,涉及Ollama、Docker Desktop及Open WebUI的安装流程及其之间的配合使用来最终达成模型的成功部署。 适用人群:面向有兴趣了解或者实际操作DeepSeek模型跨平台部署的技术开发者、研究人员以及AI爱好者。 使用场景及目标:适用于希望利用DeepSeek模型快速构建本地化应用程序、开展实验研究的用户;具体目标为掌握DeepSeek模型在桌面系统(如Linux、macOS、Windows)、iOS和Android智能手机以及云端WebUI界面上的不同部署手段和技术。 其他说明:对于每种类型的部署都提供了详细的步骤指导,旨在帮助使用者顺利完成所需工具和环境的安装,并确保模型能够正常工作。文中给出的具体链接和命令行脚本,有助于降低初次接触者的上手难度,提升部署效率和成功率。此外,还强调了一些重要的配置注意事项,例如正确输入API key以及对Ollama的初始化检查等。
交变磁场感应材料对沥青路面温度影响的研究,交变磁场下含感应材料沥青路面温度 ,交变磁场; 感应材料; 沥青路面; 温度; 变化; 加热效率,交变磁场对含感应材料沥青路面温度的影响研究