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

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

Powered by Google App Engine
This is Rietveld 408576698