ASP生成柱型体,折线图,饼图源代码提供了第1/3页

ASP生成柱型体,折线图,饼图源代码

<%

function table2(total,table_x,table_y,all_width,all_height,line_no)

'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)

'纯ASP代码生成图表函数2——折线图

'作者:龚鸣(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

for i=1 to total_no

for j=1 to line_no

if temp1<total(i,j) then temp1=total(i,j)

next

next

temp1=int(temp1)

if temp1>9 then

temp2=mid(cstr(temp1),2,1)

if temp2>4 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

temp4=temp3

response.write "<v:rect id='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/5

response.write "<v:line id='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='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='s1025' type='#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/5

next

response.write "<v:line id='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='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-1

x1=table_x+left_width+all_width*(i-1)/total_no

y1=table_y+(temp3-total(i,j))*(all_height/temp3)

x2=table_x+left_width+all_width*i/total_no

y2=table_y+(temp3-total(i+1,j))*(all_height/temp3)

response.write "<v:line id=""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)&""">"

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=""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=""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=""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=""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

for i=1 to total_no

response.write "<v:line id='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='s1025' type='#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='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='s1025' type='#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='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

%>

当前1/3页 123下一页阅读全文

时间: 2024-09-20 06:33:38

ASP生成柱型体,折线图,饼图源代码提供了第1/3页的相关文章

ASP生成柱型体,折线图,饼图源代码_应用技巧

ASP生成柱型体,折线图,饼图源代码 -------------------------------------------------------------------------------- <% function table2(total,table_x,table_y,all_width,all_height,line_no) '参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数) '纯ASP代码生成图表函数2--折线图 '作者:龚鸣(Passwordgm) QQ

ASP生成柱型体、折线图、饼图源代码

饼图|源代码|折线图 终于将这三个写成函数,可以方便大家调用,示例如下,如果有不妥之处,希望和大家多交流.如果你喜欢这个程序的话,请回复一下,是对我的支持,也希望和大家交朋友,多切磋.也请斑竹多支持! 因本站为PHP空间所以不提供演示地址 代码:<%function table2(total,table_x,table_y,all_width,all_height,line_no)'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)'纯ASP代码生成图表函数2--折线图li

ASP生成柱型体,折线图,饼图源代码

饼图|源代码|折线图    <%   function table2(total,table_x,table_y,all_width,all_height,line_no)   '参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)   '纯ASP代码生成图表函数2--折线图   '作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com   '本人非常愿意和ASP,VML,

ASP生成柱状图,折线图,饼图源代码函数

饼图|函数|源代码|折线图|柱状图 以下是柱状图代码:<% function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type) '参数含义(传递的数组,横坐标,纵坐标,柱子的厚度,柱子的宽度,图表的宽度,图表的高度,图表的类型) '纯ASP代码生成图表函数1--柱状图 '欢迎您再次访问阿里西西WEB开发社区,http://www.alixixi.com.dim tb_color(

用GD图库生成横竖柱状图折线图的类

折线图|柱状图 最近写的一个GD图库用以生成横竖柱状图和折线图的类库,算是一个教学例程吧  <? Class ImageReport{ var $X;//图片大小X轴 var $Y;//图片大小Y轴 var $R;//背影色R值 var $G;//...G. var $B;//...B. var $TRANSPARENT;//是否透明1或0 var $IMAGE;//图片对像 //------------------- var $ARRAYSPLIT;//指定用于分隔数值的符号 var $ITE

asp.net画曲线图(折线图)代码 详细注释_实用技巧

复制代码 代码如下: using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI

Asp生成RSS的类_给网站加上RSS第1/2页_应用技巧

什么是RSS? RSS是站点用来和其他站点之间共享内容的一种简易方式(也叫聚合内容),通常被用于新闻和其他按顺序排列的网站,例如Blog.一段项目的介绍可能包含新闻的全部介绍等.或者仅仅是额外的内容或者简短的介绍.这些项目的链接通常都能链接到全部的内容.网络用户可以在客户端借助于支持RSS的新闻聚合软件(如FeedDemon.SharpReader,NewzCrawler),在不打开网站内容页面的情况下阅读支持RSS输出的网站内容.网站提供RSS输出,有利于让用户发现网站内容的更新. RSS如何

求助:用VB.net可以将数据动态生成图表(折线图、柱型图等)后插入word中吗?如何做??请大家帮忙!谢谢!!!

问题描述 求助:用VB.net可以将数据动态生成图表(折线图.柱型图等)后插入word中吗?如何做??请大家帮忙!谢谢!!! 解决方案 解决方案二:DimoXLAsWord.ApplicationDimoWDAsWord.Document'创建一个工作文档oWD=oXL.Documents.Add(Missing.Value)oWD=oXL.ActiveDocumentoWD.ActiveWindow.Selection.InlineShapes.AddPicture(imagepath)'垃圾

ASP生成折线图

折线图 方法一: <%dim total(7,3) total(1,0)="中国经营报" total(2,0)="招聘网" total(3,0)="51Job" total(4,0)="新民晚报" total(5,0)="新闻晚报" total(6,0)="南方周末" total(7,0)="羊城晚报" total(0,1)="#FF0000,1.5,