dygraphs——Ò»¸öºÜìŵÄJavaScript ͼ±í¿â
dygraphs Ö÷ÒªÓÃÀ´ÏÔʾÃܼ¯Êý¾Ý¡£ËùνһͼʤǧÑÔ£¬dygraphs Éú³ÉµÄͼ±í¿ÉÒÔËæ×ÅÊó±êλÖÃÏÔʾÊý¾Ý£¬ÍÏק·Å´ó£¬Ë«»÷ËõС¡£
dygraphs ÒÀÀµHTMLµÄ<canvas>±êÇ©£¬¶øÕâ¸ö±êǩ΢ÈíµÄIE Ç¡Ç¡²»Ö§³Ö¡£¹Ù·½ÍøÒ³ÉÏ˵û¹Øϵ£¬ÄãÖ»Òª°üº¬Ò»¸ö½Ðexcanvas µÄJavaScript. ¿â¾ÍÐÐÁË£¬µ«¾ÝÎÒ²âÊÔЧ¹û²¢²»ºÃ¡£ËùÒÔÄ㻹ÊÇÔÚChrome »òÕßFirefox Ï´ò¿ª°É¡£
¹ÙÍøÉÏ»¹Ëµdygraphs Ö§³ÖÖ±½Óµ¼ÈëCSV Îļþ£¬µ«ÊÔÁ˼¸´Î¶¼Ã»³É¡£×îºó¾ö¶¨ÓÃRuby °Ñ.csv Îļþת³É.js Îļþ¡£Éú³É½Å±¾£º
pre = "function data() {\n return "
post = ";\n}"
lable = ""
s = []
PATH = "./dygraphs/temperatures.csv"
File.open(PATH) do |file|
lable += "\"#{file.gets.chomp}\\n\" +\n"
file.each_line do |line|
s << ("\"" + line.chomp + "\\n\"") if line != "\n"
end
end
File.open("c:/Pope/javascript/dygraphs/data.js", "w") do |file|
file.puts(pre + lable + s.join(" +\n") + post)
end
ÏÂÃæ½øÈëÕýÌâ¡£´úÂëºÜ¼òµ¥£º
<html>
<head>
<mce:script. type="text/javascript"
src="dygraph-combined.js"></mce:script>
</head>
<body>
<div id="graphdiv2"
style="width:500px; height:300px;"></div>
<mce:script. type="text/javascript"
src="data.js"></mce:script>
<mce:script. type="text/javascript"><!--
g2 = new Dygraph(
document.getElementById("graphdiv2"),
data(), // path to CSV file
{} // options
);
// --></mce:script>
</body>
</html>
½ÓמͿÉÒÔ¿´µ½Ò»¸±web2.0 ±¨±í£¬
×îºó»¹ÓÐÁ½Ñ¡ÏîshowRoller ºÍerrorBars£¬ÎÒҲû¸ã¶®ÊÇÕ¦»ØÊ¡£showRoller ºÃÏñÄÜʹÇúÏ߸üƽ»¬£¬errorBarsÔò¸øÇúÏßÌí¼ÓÒ»¸öÈݲΧ¡£»¹ÊÇ¿´Í¼°É£¬
Ïà¹ØÎĵµ£º
Ëæ×Åä¯ÀÀÆ÷°²È«ÐÔµÄÌá¸ß£¬ÒªÊµÏÖͼƬԤÀÀÒ²Ô½À´Ô½À§ÄÑ¡£
²»¹ýȺÖÚµÄÖÇ»ÛÊÇÎÞÏ޵ģ¬ÍøÉÏÒ²Óкܶà±äͨ»òÏȽøµÄ·½·¨À´ÊµÏÖ¡£
ÔÚÑо¿Á˸÷ÖÖÔ¤ÀÀ·½·¨ºó£¬×÷Ϊ×ܽᣬдÁËÕâ¸ö³ÌÐò£¬¸ú´ó¼ÒÒ»Æð·ÖÏí¡£
ÉÏ´ÎдµÄ¼ò±ãÎÞË¢ÐÂÎļþÉÏ´«ÏµÍ³×î³õµÄÄ¿µÄ¾ÍÊÇÓÃÀ´ÊµÏÖÕâ¸öͼƬԤÀÀЧ¹û¡£
¼æÈÝ£ºie6/7/8, firefox 3.5.5
ºǫ֧́³ÖÏ»¹¼æÈÝ ......
תÔØ:JavaScript»ñÈ¡Ò³Ãæ¿í¶È¸ß¶È´óÈ«
µØÖ·:http://www.cnblogs.com/wcg249165510/archive/2009/02/20/1394749.html
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£ºdocument.body.offsetWidth(°üÀ¨±ßÏߵĿí)
ÍøÒ³¿É¼ûÇøÓò¸ß£ºdocument.body.offsetHeight(° ......
ÏÂÃæµÄ²Ù×÷²½ÖèÃèÊöÁËÔõÑùÀûÓÃvs.netÖеĵ÷ÊÔÆ÷À´µ÷ÊÔjavascript£º
1,Ê×ÏÈ£¬ÒªÈÃÄãµÄieÔÊÐíµ÷ÊԽű¾£¬¾ßÌå²½ÖèÈçÏÂ:
´ò¿ªie->¹¤¾ß²Ëµ¥->interÑ¡Ïî->¸ß¼¶Ñ¡Ï->È¥µô“½ûÖ¹½Å±¾µ÷ÊÔ"Ñ¡Ïî
2,´ò¿ªvs.net,´´½¨Ò»¸öеÄasp.netÏîÄ¿(»ò´ò¿ªÒ»¸ö)
3,ÔËÐÐÄãÒªµ÷ÊÔµÄÒ³Ãæ
4,µ±ÄãµÄÒ³Ãæ³ÊÏÖÔÚieÀ ......
shift£ºÉ¾³ýÔÊý×éµÚÒ»Ï²¢·µ»Øɾ³ýÔªËصÄÖµ£»Èç¹ûÊý×éΪ¿ÕÔò·µ»Øundefined
var a = [1,2,3,4,5];
var b = a.shift(); //a£º[2,3,4,5] b£º1
unshift£º½«²ÎÊýÌí¼Óµ½ÔÊý×鿪ͷ£¬²¢·µ»ØÊý×éµÄ³¤¶È
var a = [1,2,3,4,5];
var b = a.unshift(-2,-1); //a£º[-2,-1,1,2,3,4,5] b£º7
×¢£ºÔÚIE6.0ϲâÊÔ·µ»ØÖµ ......
http://203.208.39.132/search?q=cache:CS7gmmmKO1UJ:cdivilly.wordpress.com/2008/09/05/debugging-javascript-on-internet-explorer-mobile/+mobile+ie+debug&cd=2&hl=zh-CN&ct=clnk&gl=cn&client=firefox-a&st_usg=ALhdy2_5z6wqB0HLfTGoC9EDfEwpnra-LQ ......