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

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

Powered by Google App Engine
This is Rietveld 408576698