<ptml xmlns:v= "URN:SCHEMAS-MICROSOFT-COM:VML" > <pead> <meta http-equiv= "Content-type" content= "text/" html charset=gb2312 "> <meta name=" generator "content=" Microsoft FrontPage 4.0 "> <meta name=" ProgId "content=" FrontPage.Editor.Document "> <title> VRML report</title> <style><!--v\:* {behavior:url (# DEFAULT#VML)}/* Declaration V for VML variable * *--></style><style bogus= "1" >v\:* {behavior:url (#default #vml)}/* Declaration V for VML variable */</style> </pead> <body onload= "INITVRML ();" > <script type= "text/javascript" ><!--//Analog data var recordsetarray=new Array (); Analog Record bar number Var irecordcount=20; for (iindex=0;iindex<irecordcount;iindex++) {var unitarray=new Array (); Unitarray[0]=iindex; Unitarray[1]=math.round (Math.random () *1000); Recordsetarray[iindex]=unitarray; //Analog data Y-axis Max [range] var irecordmaxx=20;//analog data X-axis maximum [range] var irecordmaxy=1000;//analog data Y-axis max [Range]//coordinate system Var iscreenwidth=400 ;/true width px var iscreenheight=400;//true Heightdegree px var icoordsizex=4000;//delimited width var icoordsizey=4000;//separator height var icoordsizestep=200;//axis and margin var irectsize=100;//column column body width degree var vgroup=null;//vrml region function Line (irecordcount) {vrmlid.innerhtml= ""; INITVRML (); Coordsize (); Coordsizeline (); var ifromx=icoordsizestep; var ifromy=0; for (iindex=0;iindex<irecordcount;iindex++) {var vline=document.createelement ("V:line"); vline.style.left= "0"; vline.style.top= "0"; Vline.from= "' +ifromx+", "+ifromy+"; Ifromx=icoordsizestep+math.round (recordsetarray[iindex][0]* (icoordsizex-icoordsizestep)/iRecordMaxX); Ifromy=math.round (recordsetarray[iindex][1]* (icoordsizey-icoordsizestep)/irecordmaxy); Vline.to= "' +ifromx+", "+ifromy+"; Vline.strokecolor= "#000000"; vline.strokeweight= "1"; vline.title= "Analog Data" +recordsetarray[iindex][0]+ "section"; var vstroke=document.createelement ("V:stroke"); Vstroke.endarrow= "Classic"; Vstroke.startarrow= "Oval"; Vline.appendchild (Vstroke); Vgroup.appendchild (VLine); }} function Circle (iRecordCount) {vrmlid.innerhtml= ""; INITVRML (); var varmax=math.pow (2,16) *360; var vtotal=1; var vstartangle=0; var vendangle=0; var vpreangle=0; for (kindex=0;kindex<irecordcount;kindex++) {vtotal+=recordsetarray[kindex][1]; for (iindex=0;iindex<irecordcount;iindex++) {var vshape=document.createelement ("V:shape"); Vstartangle+=vpreangle; Vpreangle=recordsetarray[iindex][1]/vtotal; Vendangle=recordsetarray[iindex][1]/vtotal; Vshape.style.width=icoordsizex-2*icoordsizestep; Vshape.style.height=icoordsizey-2*icoordsizestep; Vshape.style.top=icoordsizestep; Vshape.style.left=icoordsizestep; Vshape.strokecolor= "BLACK"; Vshape.fillcolor=randcolor (); "M vshape.path= AE" +parseint (varmax*vstartangle) + "" +parseint (Varmax*vendangle) + "XE"; vshape.title= "section" +recordsetarray[iindex][0]+ "block"; Vshape._scale=parseint (360* (VSTARTANGLE+VENDANGLE/2)); Vgroup.appendchild (Vshape); } function Bar (irecordcount) {vrmlid.innerhtml= "";INITVRML (); Coordsize (); Coordsizeline (); var istep=math.round (Icoordsizex/irecordcount); for (iindex=1;iindex<irecordcount;iindex++) {var irnd=math.round (Math.random () * (Icoordsizey-icoordsizestep)); var vrect=document.createelement ("V:rect"); Vrect.style.left=istep*iindex; vrect.style.top= (Icoordsizey-icoordsizestep)-math.round (recordsetarray[iindex][1]* (ICoordSizeY-iCoordSizeStep) /irecordmaxy); Vrect.style.width=irectsize; Vrect.style.height=math.round (recordsetarray[iindex][1]* (icoordsizey-icoordsizestep)/iRecordMaxY); Vrect.fillcolor= "#EEEEEE"; Vrect.title= "The y-axis diagram of the" +recordsetarray[iindex][0]+ "section of the analog data"; Vgroup.appendchild (Vrect); } function Drawlinesx (imaxx,object) {var istep=math.round (Icoordsizex/imaxx); for (Var iindex=1;iindex<=imaxx;iindex++) {var vline=document.createelement ("V:line"); Vline.from=istep*iindex+ "," + (Icoordsizey-icoordsizestep); Vline.to=istep*iindex+ "," + (Icoordsizey-math.round (ICOORDSIZESTEP/2)); var vstroke=document.createelement ("V:stroke"); Vstroke.endarrow= "Diamond"; Vstroke.dashstyle= "Dot"; Vline.appendchild (Vstroke); Object.appendchild (VLine); } function Drawlinesy (imaxy,object) {var istep=math.round (icoordsizey/imaxy); for (Var iindex=0;iindex<imaxy;iindex++) {var vline=document.createelement ("V:line"); Vline.from=icoordsizestep+ "," +ISTEP*IINDEX; Vline.to=math.round (ICOORDSIZESTEP/2) + "," +ISTEP*IINDEX; var vstroke=document.createelement ("V:stroke"); Vstroke.endarrow= "Diamond"; Vstroke.dashstyle= "Dot"; Vline.appendchild (Vstroke); Object.appendchild (VLine); }} function Initvrml () {vrmlid.innerhtml= ""; Vgroup=document.createelement ("V:group"); vgroup.style.width=iscreenwidth+ "px"; vgroup.style.height=iscreenheight+ "px"; Vgroup.coordsize=icoordsizex+ "," +icoordsizey; var vrect=document.createelement ("V:rect"); vrect.style.width=icoordsizex+ "px"; vrect.style.height=icoordsizey+ "px"; Vrect.fillcolor= "#FFFFFF"; Vrect.strokecolor= "#000000"; var vshadow=document.createelemeNT ("V:shadow"); Vshadow.on= "true"; Vshadow.type= "single"; Vshadow.color= "Silver"; Vshadow.offset= "5pt,5pt"; Vrect.appendchild (Vshadow); Vgroup.appendchild (Vrect); Vrmlid.appendchild (Vgroup); function Coordsize () {var vlinex=document.createelement ("V:line"); Vlinex.from=icoordsizestep+ "," +ICOORDSIZESTEP; Vlinex.to=icoordsizestep+ "," + (Icoordsizey-icoordsizestep); var vstrokex=document.createelement ("V:stroke"); vstrokex.startarrow= "Classic"; vstrokex.endarrow= "Oval"; Vstrokex.dashstyle= "single"; Vlinex.appendchild (Vstrokex); Vgroup.appendchild (Vlinex); var vliney=document.createelement ("V:line"); Vliney.from=icoordsizestep+ "," + (Icoordsizey-icoordsizestep); Vliney.to= (Icoordsizex-icoordsizestep) + "," + (Icoordsizey-icoordsizestep); var vstrokey=document.createelement ("V:stroke"); vstrokey.startarrow= "Oval"; vstrokey.endarrow= "Classic"; Vstrokey.dashstyle= "single"; Vliney.appendchild (Vstrokey); Vgroup.appendchild (Vliney); function Coordsizeline () {drawlInesx (Recordsetarray.length,vgroup); Drawlinesy (Recordsetarray.length,vgroup); function Randcolor () {return "RGB" +parseint (Math.random () *255) + "," +parseint (Math.random () *255) + "," +parseint ( Math.random () *255) + ")"; function Zoom (ivalue) {var varx=4000; var vary=4000; Vgroup.coordsize=parseint (Varx/ivalue) + "," +parseint (Vary/ivalue); }//--></script> <center> <input type= "button" value= "Initial Settings" onclick= "INITVRML ();" > <input type= "button" value= "Histogram" onclick= bar (recordsetarray.length); " > <input type= "button" value= "pie chart onclick=" Circle (recordsetarray.length); " > <input type= "button" value= "line chart" onclick= "lines (recordsetarray.length)" > <select onchange= "Zoom" ( This.value) "> <option value=" 0.2 "selected>20%</option> <option value=" 0.25 ">25%</option > <option value= "0.4" >40%</option> <option value= "0.5" >50%</option> <option value= " 0.75 ">75%</option> <option value="0.8" >80%</option> <option value= "1" > Original size </option> <option value= "1.25" >125%</option > <option value= "1.5" >150%</option> <option value= "2" >200%</option> <option value= "3" & Gt;300%</option> <option value= "4" >400%</option> </select> <div id=vrmlid></div& Gt </center> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]