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

Side by Side Diff: bower_components/chartnewjs/Samples/function_gauss.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 <SCRIPT src='../Add-ins/format.js'></script>
5
6 <SCRIPT>
7
8 defCanvasWidth=1200;
9 defCanvasHeight=600;
10
11
12 var mydata1 = {
13 labels : ["-3",-2,-1,"0",1,2,"3"],
14 xBegin : -3,
15 xEnd : 3,
16 datasets : [
17 {
18 strokeColor : "rgba(220,220,220,1)",
19 data : [],
20 xPos : [],
21 title : "Sinus"
22 }
23 ]
24 }
25 var gauss_var=1;
26 var gauss_mean=0;
27
28 var nbiter=400;
29 for(var i=0;i<nbiter;i++)
30 {
31 mydata1.datasets[0].xPos[i]=mydata1.xBegin+i*(mydata1.xEnd-mydata1.xBegin)/nbi ter;
32 mydata1.datasets[0].data[i]=(1/(gauss_var*Math.sqrt(2*Math.PI))) * Math.exp(-( (mydata1.datasets[0].xPos[i]-gauss_mean)*(mydata1.datasets[0].xPos[i]-gauss_mean ))/(2*gauss_var));
33 }
34
35
36 var opt1 = {
37 canvasBorders : true,
38 canvasBordersWidth : 3,
39 canvasBordersColor : "black",
40 graphTitle : "Gauss Function - (0,1)",
41 legend : true,
42 datasetFill : false,
43 annotateDisplay : true,
44 pointDot :false,
45 animationLeftToRight : true,
46 animationEasing: "linear",
47 yAxisMinimumInterval : 0.02,
48 graphTitleFontSize: 18
49
50 }
51
52
53 </SCRIPT>
54
55
56 <html>
57 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
58 <head>
59 <title>Demo ChartNew.js</title>
60 </head>
61 <body>
62
63 <center>
64 <FONT SIZE=6><B>Demo of ChartNew.js !</B></FONT> <BR>
65
66 <script>
67
68 document.write("<canvas id=\"canvas_Line1\" height=\""+defCanvasHeight+"\" w idth=\""+defCanvasWidth+"\"></canvas>");
69 window.onload = function() {
70 var myLine = new Chart(document.getElementById("canvas_Line1").getContext("2 d")).Line(mydata1,opt1);
71 }
72 </script>
73 </body>
74 </html>
OLDNEW
« no previous file with comments | « bower_components/chartnewjs/Samples/function_X-1.html ('k') | bower_components/chartnewjs/Samples/function_sinus_cosinus.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698