OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 | |
3 <!--[if lte IE 8]><SCRIPT src='source/excanvas.js'></script><![endif]--> | |
4 <SCRIPT src='../ChartNew.js'></script> | |
5 <SCRIPT src='../Add-ins/format.js'></script> | |
6 | |
7 | |
8 <SCRIPT> | |
9 | |
10 | |
11 defCanvasWidth=1200; | |
12 defCanvasHeight=600; | |
13 | |
14 | |
15 var datedata = { | |
16 labels: [new Date(2014,0,1,12,0,0), new Date(2014,1,1,12,15,
0), new Date(2014,2,1,12,30,0), new Date(2014,3,1,12,45,0)], | |
17 datasets: [ | |
18 { | |
19 fillColor: "rgba(220,0,0,0.5)", | |
20 strokeColor: "rgba(220,220,220,0.5)", | |
21 data: [20,10,47,35] | |
22 }, | |
23 { | |
24 fillColor: "rgba(0,220,0,0.5)", | |
25 strokeColor: "rgba(220,220,220,0.5)", | |
26 data: [13,43,55,33] | |
27 }, | |
28 { | |
29 fillColor: "rgba(0,0,220,0.5)", | |
30 strokeColor: "rgba(220,220,220,0.5)", | |
31 data:[45,37,39,41] | |
32 } | |
33 ] | |
34 } | |
35 | |
36 | |
37 </SCRIPT> | |
38 | |
39 | |
40 <html> | |
41 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
42 <head> | |
43 <title>Sample for format.js add-in</title> | |
44 | |
45 </head> | |
46 <body> | |
47 | |
48 <!div id="divCursor" style="position:absolute"> <!/div> | |
49 | |
50 <center> | |
51 <FONT SIZE=6><B>Sample for format.js add-in</B></FONT> <BR> | |
52 | |
53 <script> | |
54 | |
55 | |
56 document.write("<canvas id=\"canvas_line1\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
57 document.write("<canvas id=\"canvas_line2\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
58 document.write("<canvas id=\"canvas_line3\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
59 document.write("<canvas id=\"canvas_line4\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
60 document.write("<canvas id=\"canvas_line5\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
61 document.write("<canvas id=\"canvas_line6\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
62 document.write("<canvas id=\"canvas_line7\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
63 document.write("<canvas id=\"canvas_line8\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
64 document.write("<canvas id=\"canvas_line9\" height=\""+defCanvasHeight+"\"
width=\""+defCanvasWidth+"\"></canvas>"); | |
65 document.write("<canvas id=\"canvas_line10\" height=\""+defCanvasHeight+"\
" width=\""+defCanvasWidth+"\"></canvas>"); | |
66 | |
67 | |
68 window.onload = function() { | |
69 | |
70 | |
71 var myLine = new Chart(document.getElementById("canvas_line1").getContext("2
d")).Line(datedata,{ graphTitle : "No Date Format",animation :false}); | |
72 var myLine = new Chart(document.getElementById("canvas_line2").getContext("2
d")).Line(datedata,{fmtXLabel : "date en-US",graphTitle : "Format : date en-US",
animation :false}); | |
73 var myLine = new Chart(document.getElementById("canvas_line3").getContext("2
d")).Line(datedata,{fmtXLabel : "date en-GB",graphTitle : "Format : date en-GB",
animation :false}); | |
74 var myLine = new Chart(document.getElementById("canvas_line4").getContext("2
d")).Line(datedata,{fmtXLabel : "date ko-KR",graphTitle : "Format : date ko-KR",
animation :false}); | |
75 var myLine = new Chart(document.getElementById("canvas_line5").getContext("2
d")).Line(datedata,{fmtXLabel : "date de-DE weekday: long, year: numeric, month:
long, day: numeric",graphTitle : "Format : date de-DE weekday: long, year: nume
ric, month: long, day: numeric",animation :false}); | |
76 var myLine = new Chart(document.getElementById("canvas_line6").getContext("2
d")).Line(datedata,{fmtXLabel : "fmtdate mm/yyyy",graphTitle : "Format : fmtdate
mm/yyyy",animation : false}); | |
77 var myLine = new Chart(document.getElementById("canvas_line7").getContext("2
d")).Line(datedata,{fmtXLabel : "fmtdate yy/mm/dd",graphTitle : "Format : fmtdat
e yy/mm/dd",animation :false}); | |
78 var myLine = new Chart(document.getElementById("canvas_line8").getContext("2
d")).Line(datedata,{fmtXLabel : "time",graphTitle : "Format : time",animation :f
alse}); | |
79 var myLine = new Chart(document.getElementById("canvas_line9").getContext("2
d")).Line(datedata,{fmtXLabel : "fmttime hh:mm:ss",graphTitle : "Format : fmttim
e hh:mm:ss",animation : false}); | |
80 var myLine = new Chart(document.getElementById("canvas_line10").getContext("
2d")).Line(datedata,{fmtXLabel : "fmttime ss:mm:hh",graphTitle : "Format : fmtti
me ss:mm:hh",animation :false}); | |
81 | |
82 } | |
83 </script> | |
84 </body> | |
85 </html> | |
OLD | NEW |