Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: bower_components/chartnewjs/Samples/animation_radar.html

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2
3 <!--[if lte IE 8]><SCRIPT src='source/excanvas.js'></script><![endif]--><SCRIPT src='../ChartNew.js'></script>
4
5
6 <SCRIPT>
7
8 function setColor(area,data,config,i,j,animPct,value)
9 {
10 if(value > 35)return("rgba(220,0,0,"+animPct);
11 else return("rgba(0,220,0,"+animPct);
12
13 }
14
15 var charJSPersonnalDefaultOptions = { decimalSeparator : "," , thousandSeparator : ".", roundNumber : "none", graphTitleFontSize: 2 };
16
17 defCanvasWidth=600;
18 defCanvasHeight=300;
19
20
21 var mydata1 = {
22 labels : ["January","February","March","April","May","June","July"],
23 // labels : ["January"],
24 datasets : [
25 {
26 fillColor : "rgba(220,220,220,0.5)",
27 strokeColor : "rgba(220,220,220,1)",
28 pointColor : "rgba(220,220,220,1)",
29 pointstrokeColor : "yellow",
30 data : [95,53,99,,73,27,82],
31 // data : [40],
32
33 title : "2014"
34 },
35 {
36 fillColor : "rgba(151,187,205,0.5)",
37 strokeColor : "rgba(151,187,205,1)",
38 pointColor : "green",
39 pointstrokeColor : "yellow",
40 data : [35,43,59,,31,50,66],
41 // data : [35],
42 title : "2013"
43 }
44 ]
45 }
46
47 var startWithDataset =1;
48 var startWithData =1;
49
50 var opt1 = {
51 animationStartWithDataset : startWithDataset,
52 animationStartWithData : startWithData,
53 animationSteps : 200,
54 canvasBorders : true,
55 canvasBordersWidth : 3,
56 canvasBordersColor : "black",
57 graphTitle : "default animation",
58 legend : true,
59 inGraphDataShow : true,
60 annotateDisplay : true,
61 graphTitleFontSize: 18
62
63 }
64
65 var opt2 = {
66 animationStartWithDataset : startWithDataset,
67 animationStartWithData : startWithData,
68 animationLeftToRight : true,
69 animationSteps : 200,
70 animationEasing: "linear",
71 canvasBorders : true,
72 canvasBordersWidth : 3,
73 canvasBordersColor : "black",
74 graphTitle : "animationLeftToRight=true",
75 legend : true,
76 inGraphDataShow : true,
77 annotateDisplay : true,
78 graphTitleFontSize: 18
79
80 }
81
82 var opt3 = {
83 animationStartWithDataset : startWithDataset,
84 animationStartWithData : startWithData,
85 animationByDataset : true,
86 animationSteps : 200,
87 animationEasing: "linear",
88 canvasBorders : true,
89 canvasBordersWidth : 3,
90 canvasBordersColor : "black",
91 graphTitle : "animationByDataset=true",
92
93 legend : true,
94 inGraphDataShow : true,
95 annotateDisplay : true,
96 graphTitleFontSize: 18
97 }
98
99 var opt4 = {
100 animationStartWithDataset : startWithDataset,
101 animationStartWithData : startWithData,
102 animationLeftToRight : true,
103 animationByDataset : true,
104 animationSteps : 200,
105 animationEasing: "linear",
106 canvasBorders : true,
107 canvasBordersWidth : 3,
108 canvasBordersColor : "black",
109 graphTitle : "animationByDataset=true & animationLeftToRight=true ",
110 legend : true,
111 inGraphDataShow : true,
112 annotateDisplay : true,
113 graphTitleFontSize: 18
114 }
115
116
117 </SCRIPT>
118
119
120 <html>
121 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
122 <head>
123 <title>Demo ChartNew.js</title>
124 </head>
125 <body>
126
127 <center>
128 <FONT SIZE=6><B>Demo of ChartNew.js !</B></FONT> <BR>
129
130 <script>
131
132 document.write("<canvas id=\"canvas_Radar1\" height=\""+defCanvasHeight+"\" width=\""+defCanvasWidth+"\"></canvas>");
133 document.write("<canvas id=\"canvas_Radar2\" height=\""+defCanvasHeight+"\" width=\""+defCanvasWidth+"\"></canvas>");
134 document.write("<canvas id=\"canvas_Radar3\" height=\""+defCanvasHeight+"\" width=\""+defCanvasWidth+"\"></canvas>");
135 document.write("<canvas id=\"canvas_Radar4\" height=\""+defCanvasHeight+"\" width=\""+defCanvasWidth+"\"></canvas>");
136 window.onload = function() {
137
138
139 var myRadar = new Chart(document.getElementById("canvas_Radar1").getContext( "2d")).Radar(mydata1,opt1);
140 var myRadar = new Chart(document.getElementById("canvas_Radar2").getContext( "2d")).Radar(mydata1,opt2);
141 var myRadar = new Chart(document.getElementById("canvas_Radar3").getContext( "2d")).Radar(mydata1,opt3);
142 var myRadar = new Chart(document.getElementById("canvas_Radar4").getContext( "2d")).Radar(mydata1,opt4);
143
144 }
145
146 </script>
147 </body>
148 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698