OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 | |
3 <!--[if lte IE 8]><SCRIPT src='source/excanvas.js'></script><![endif]--><SCRIPT
src='../ChartNew.js'></script> | |
4 <SCRIPT src='../Add-ins/format.js'></script> | |
5 | |
6 <SCRIPT> | |
7 | |
8 var charJSPersonalDefaultOptions = { decimalSeparator : "," , thousandSeparator
: ".", roundNumber : "none", graphTitleFontSize: 2 }; | |
9 | |
10 defCanvasWidth=1200; | |
11 defCanvasHeight=600; | |
12 | |
13 | |
14 var mydata1 = { | |
15 labels : [new Date(2014,0,1,0,0,0),new Date(2014,0,1,3,0,0),new Date(201
4,0,1,6,0,0),new Date(2014,0,1,9,0,0),new Date(2014,0,1,12,0,0),new Date(2014,0,
1,15,0,0),new Date(2014,0,1,18,0,0),new Date(2014,0,1,21,0,0),new Date(2014,0,1,
24,0,0)], | |
16 datasets : [ | |
17 { | |
18 fillColor : "rgba(220,220,220,0.5)", | |
19 strokeColor : "rgba(220,220,220,1)", | |
20 pointColor : "rgba(220,220,220,1)", | |
21 pointStrokeColor : "rgba(220,220,220,1)", | |
22 data : [95,53,99,87,73,27,82], | |
23 xPos : [new Date(2014,0,1,2,43,12),new Date(2014,0,1,3,17,10),new Date(201
4,0,1,7,33,25),new Date(2014,0,1,11,9,01),new Date(2014,0,1,15,52,10),new Date(2
014,0,1,18,23,56),new Date(2014,0,1,21,34,41)], | |
24 title : "With xPos" | |
25 } | |
26 ] | |
27 } | |
28 | |
29 | |
30 var opt1 = { | |
31 canvasBorders : true, | |
32 canvasBordersWidth : 3, | |
33 canvasBordersColor : "black", | |
34 graphTitle : "Time graphic", | |
35 legend : true, | |
36 inGraphDataShow : true, | |
37 inGraphDataTmpl : "<%=v3 + ' (' + v2 + ')'%>", | |
38 fmtV2 : "fmtdatetime MM/DD/YYYY HH:mm:ss", | |
39 graphTitleFontSize: 18, | |
40 fmtXLabel : "fmttime HH:mm", | |
41 graphMin : 0, | |
42 yAxisMinimumInterval : 5, | |
43 | |
44 | |
45 } | |
46 | |
47 | |
48 </SCRIPT> | |
49 | |
50 | |
51 <html> | |
52 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
53 <head> | |
54 <title>Demo ChartNew.js</title> | |
55 </head> | |
56 <body> | |
57 | |
58 <center> | |
59 <FONT SIZE=6><B>Demo of ChartNew.js !</B></FONT> <BR> | |
60 | |
61 <script> | |
62 | |
63 document.write("<canvas id=\"canvas_Line1\" height=\""+defCanvasHeight+"\" w
idth=\""+defCanvasWidth+"\"></canvas>"); | |
64 window.onload = function() { | |
65 | |
66 | |
67 var myLine = new Chart(document.getElementById("canvas_Line1").getContext("2
d")).Line(mydata1,opt1); | |
68 } | |
69 </script> | |
70 </body> | |
71 </html> | |
OLD | NEW |