Stereoscopic statistics for achieving ASP + VML (1) ----- histogram

xiaoxiao2021-03-06  50

Dynamic charts on the web page have always been a lot of things that a web programmer feels very headaches. After a period of research on VML, it was found that it was still very convenient to implement the chart on the HTML page. Now I will send me a three-dimensional statistical figure that I implemented with ASP VML to everyone, I hope to help everyone. (If you want to pay, please still keep my name, after all, I spent a lot of time working outcomes. :))

First of all, the simplest ------ histogram

Column status

yuan

2500

2000

1500

1000

500

200

Project 1

800

Project 2

1004

Project 3

600

Project 4

1222

Project 5

2100

Project 6

80

Project 7

1002

Project 8

145

Project 9

1040

Project 10

<%

'┏┏━━━━━━━━━━━━━━━━━━━━┓┓┓┓┓

'

'Abstract: statistics - histogram

'Consumers: Weng Yunbing

'Caution date: November 5th, 2004

'Completion date: November 5, 2004

'

'┗┗━━━━━━━━━━━━━━━━━━━━┛┛┛┛┛

'Parameter meanings (array, horizontal coordinate, longitudinal coordinate, width, graphic height, chart title, X-axis unit, Y-axis unit)

Function Table1 (Stat_Array, Table_LID, TABLE_TOP, All_WIDTH, ALL_HEIGHT, TABLE_TILE, X_UNIT, Y_UNIT)

DIM BG_COLOR (10)

BG_COLOR (1) = "# ff1919"

BG_COLOR (2) = "# fff19"

BG_COLOR (3) = "# 1919ff"

BG_COLOR (4) = "# 19ff19"

BG_COLOR (5) = "# fc0"

BG_COLOR (6) = "# 3cc"

BG_COLOR (7) = "# ff19ff"

BG_COLOR (8) = "# 993300"

BG_COLOR (9) = "# f60"

BG_COLOR (10) = "# ff8c19"

IF X_Unit <> "" ""

X_Unit = X_Unit

END IF

IF Y_Unit <> "" "

Y_Unit = y_Unit

END IF

Num = ubound (stat_array, 1)

item_width = cint (20000 / NUM 0.5)

Begin_x = CINT ((item_width-1200) / 2) 2200

VALUE_MAX = 0

For i = 1 to Num

IF value_max

NEXT

VALUE_MAX = CINT (value_max)

VALUE_MAX_STR = CSTR (value_max)

IF value_max> 9 THEN

Temp = MID (value_max_str, 2, 1) IF TEMP> 4 THEN

Temp2 = (int (value_max / (10 ^ (LEN (value_max_str) -1))))))) 1) * 10 ^ (LEN (Value_max_STR) -1)

Else

Temp2 = (int (Value_max / (10 ^ (LEN (Value_max_STR) -1))))) 0.5) * 10 ^ (LEN (Value_max_STR) -1)

END IF

Else

IF value_max> 4 TEMP2 = 10 else temp2 = 5

END IF

Item_Hight = Temp2 / 5

Response.write " "

response.Write " "

Response.write ""

Response.write ""

response.Write " "

Response.write "" response.write " "response.write"

"response.write" "response.write"
"& Table_Title &" "response.write" "response.write" "response.write" "response.write" "

Response.write " "Response.write" "Response.write" < v: line id = 'x' from = '1700, 11700' to = '22700, 11700' style = 'z-index: 2' strokecolor = '# 000000' strokeweight = 1pt> "response.write" "

Response.write "" response.write "

"& y_Unit &" "response.write" < / v: Rect> "response.write" "Response .Write "
" & x_unit & " "response.write" "for i = 0 to 4 response.write" " response.write " "response.write" " response.write " "response.write" "response.write" "response.write" "response.write"
"& item_hight * (5-i) &" "Response .Write "" Next

Response.write " " response.write "< v: line from = '2200, 1200' to = '2200, 11200' style = 'z-index: 2' strokecolor = '# 0099ff'> "response.write" "for i = 1 to num this_hight = cint (stat_Array (i, 1 ) / (5 * item_hight) * 10000 420) Response.write " "response.write" "Response.write" < / v: shape> "

Response.write " "response.write"

"& stat_Array (i, 1) &" "response.write" "response.write" "response.write"
"& stat_Array (i, 2) &" "Response .Write "" Next response.write "" End function%> </ title> <style> v /: * {behavior: URL (# default # vml)} o /: * {behavior: URL (#default #VML)} </ stop> </ head> <body></p> <p><% DIM TOTAL (10, 2)</p> <p>Total (1) = 200 Total (2, 1) = 800 Total (3, 1) = 1004 Total (4, 1) = 600 Total (5, 1) = 1222 Total (6, 1) = 2100 Total 7, 1) = 80 Total (8, 1) = 1002 Total (9, 1) = 145 Total (10, 1) = 1040</p> <p>Total (1,2) = "Item 1" Total (2, 2) = "Item 2" Total (3, 2) = "Item 3" Total (4, 2) = "Item 4" Total (5, 2) = "Project 5" Total (6, 2) = "Item 6" Total (7, 2) = "Item 7" Total (8, 2) = "Item 8" Total (9, 2) = "Item 9" Total (10, 2) = "Project 10" Call Table1 (Total, 240, 200, 700, 400, "Column Statistics", "" "," Yuan ")%></p> <p></ body> </ html></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-81678.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="81678" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.041</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'BZlsBnvRO1Gn_2F0OYokVtf4MQrNjaWx12EiKwnsUTqNZZawfzKFj_2FI_2F5yod2b_2Bb1VK_2BPr905HPHDh0cVYRarD8Q_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>